PhileCMS / Phile

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

phile shouldn't be opinionated about trailing/non-trailing slash #159

Closed Schlaefer closed 9 years ago

Schlaefer commented 10 years ago

117 makes sub-root deployment more complicated and ties functional behavior to the webserver. Imho Phile should not rely on an apache rewrite rule. The phile request handler should accept and serve both schemes and leave any opinion about slash/non-slash up to the user.

NeoBlack commented 10 years ago

In general ok, but have you an idea?

Schlaefer commented 10 years ago

See #160. Internally the non-trailing slash scheme is used. So if there's a trailing slash in the URI just remove it.

NeoBlack commented 10 years ago

ok looks good, but we need a redirect in the PHP code then. the problem with trailing slash or no trailing slash is, that search engines like google will index both pages, which results in duplicate content.

Schlaefer commented 10 years ago

I'm aware of that issue, but I'm fine with Phile leaving that responsibility up to the (informed) enduser. Mention it in the docs and call it a day. ;)

Anyhow I updated the pull request with a redirect to non-slash. Opinionated again, but imho it's still preferable to the .htaccess redirect.

james2doyle commented 9 years ago

Can this be closed yet?