help with trailing slashes
Hi
I'm currently starting to work with zf, but I've a big problem, that needs to be solved before I go on.
zf does not care about the trailing slash in urls, but it is a no go, if you want to go for seo.
An example:
GET /index/action HTTP/1.1
is not the same as
GET /index/action/ HTTP/1.1
If you have not spotted the difference, one has a trailing forward slash ‘/’ in the URI and one does not. For one is requesting the content of object ‘action’ under directory ‘/index/’, and another one is requesting the content of the index file under directory ‘/index/action/’. Although many of us would usually ignore the trailing slash, and write out the URL without it, web servers usually will correct this behaviour by replying a 301 permanent redirect to an URL with the trailing slash, if ‘action’ is indeed a directory.
Here is a point out of “Quality Guidelines - Specific recommendations” by Google:
Don’t create multiple pages, subdomains, or domains with substantially duplicate content.
But that is done as zf doesn't care about it.
So is there a way to get zf only accept urls with a trailing slash and throw a 404 or 301 if it does not?
thx
|