SEO gone mad...
nginx-forum at nginx.us
Mon Oct 12 21:28:55 UTC 2015
> I have a requirement from a customer that the terminal slash be
> rewritten when accessing the homepage - eg example.com/ is a 301 to
> I've tried a simple rewrite of ^/$ but that just loops.
In the given example request "example.com", the path is going to be the same
for both when the trailing slash is present and when it is not. The request
being sent to nginx from the client is identical in both situations, both
will result in "GET / HTTP/1.1".
If you want to confirm the behavior yourself, you can tcpdump the requests
and observe for yourself that there are no differences. Nginx can't
distinguish between example.com and example.com/.
I hope this helps to clarify things!
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,262128,262130#msg-262130
More information about the nginx