PhileCMS / Phile

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

[BUG] Trailing slashes #102

Closed mithat closed 10 years ago

mithat commented 10 years ago

Do a virgin install.

http://localhost:8080/phile/sub => works http://localhost:8080/phile/sub/ => works http://localhost:8080/phile/sub/pages => works http://localhost:8080/phile/sub/pages/ => 404

I can't tell my visitors not to type trailing slashes. What should I do?

I'm using lampstack-5.4.31-0 for development with the provided Phile .htaccess.

james2doyle commented 10 years ago

Which version of Phile?

mithat commented 10 years ago

index.php says 'PHILE_VERSION', '1.1.1'

I got it via composer create-project phile-cms/phile about an hour ago.

james2doyle commented 10 years ago

Ok I'll have to check this out. I remember it was supposed to be fixed at one point but seems like it wasn't tested thoroughly enough.

I wouldn't worry much about the users typing in the URL wrong. Most people google, use the links on the site, or it just auto fills the correct URL they were last at.

That said I will look into this!

mithat commented 10 years ago

On the Google issue, I think there is a group of people that say your site should redirect synonymous URLs to One Holy URL. Supposedly doing solves the problem of search engines thinking http://yoursite.com/sub and http://yoursite.com/phile/sub/ are different things.

Maybe Phile should default to "all URLs are (not) slashed" and redirect as needed? I prefer no slashes as it makes reading the leaf easier.

NeoBlack commented 10 years ago

I can reproduce this on the latest version and will take care of it for the next release. this is a bug.

NeoBlack commented 10 years ago

@mithat I fixed this problem in pull request #117 please review the changes and approve it with +1 comment in the pull request if it solves your problem.