SEO gone mad...

Fireye00 nginx-forum at
Mon Oct 12 21:28:55 UTC 2015

Howdy Steve,

> I have a requirement from a customer that the terminal slash be
> rewritten when accessing the homepage - eg is a 301 to

> I've tried a simple rewrite of ^/$ but that just loops.

In the given example request "", 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 and

I hope this helps to clarify things!


Posted at Nginx Forum:,262128,262130#msg-262130

More information about the nginx mailing list