Skip to content
Snippets Groups Projects
Unverified Commit 4ed1bcf6 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2970132 by neerajsingh, webflo: .ht.router.php causes a redirect loop...

Issue #2970132 by neerajsingh, webflo: .ht.router.php causes a redirect loop when invoked from parent directory
parent 154f2828
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@
*/
$url = parse_url($_SERVER['REQUEST_URI']);
if (file_exists('.' . $url['path'])) {
if (file_exists(__DIR__ . $url['path'])) {
// Serve the requested resource as-is.
return FALSE;
}
......@@ -38,7 +38,7 @@
// fallback to index.php.
do {
$path = dirname($path);
if (preg_match('/\.php$/', $path) && is_file('.' . $path)) {
if (preg_match('/\.php$/', $path) && is_file(__DIR__ . $path)) {
// Discovered that the path contains an existing PHP file. Use that as the
// script to include.
$script = ltrim($path, '/');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment