PhileCMS / Phile

A flat file CMS with a swappable parser and template engine.
https://philecms.github.io/
Other
257 stars 49 forks source link

some urls (that have base_url in them) are not served returning 404 - with solution #245

Closed jpralves closed 9 years ago

jpralves commented 9 years ago

The is an issue that prevents urls that have some part of the "base_url" in them from being served.

test for reproducing the problem: Place the root of the Phile under /phile Change the .htaccess to point RewriteBase /phile

Now create a folder in content/sub called phile Place an index.md in it.

then go to http:///phile/sub/phile/

And get an 404 error.

You can solve the problem by changing the function getCurrentUrl() in lib/Phile/Core/Router.php where: $url = str_replace($basePath, '', $url); replace by: $url = substr($url, strlen($basePath));

regards,

João

Schlaefer commented 9 years ago

fixed in #246