Add option to not use URL rewriting

This commit is contained in:
Bernd Bestel
2018-06-15 20:50:40 +02:00
parent 02b6c3b721
commit 0954b5a741
16 changed files with 68 additions and 55 deletions

View File

@@ -18,9 +18,16 @@ class UrlManager
protected $BasePath;
public function ConstructUrl($relativePath)
public function ConstructUrl($relativePath, $isResource = false)
{
return rtrim($this->BasePath, '/') . $relativePath;
if (DISABLE_URL_REWRITING === false || $isResource === true)
{
return rtrim($this->BasePath, '/') . $relativePath;
}
else // Is not a resource and URL rewriting is disabled
{
return rtrim($this->BasePath, '/') . '/index.php' . $relativePath;
}
}
private function GetBaseUrl()