SEO gone mad...

Andrew Hutchings ahutchings at
Tue Oct 13 13:09:18 UTC 2015


On Tuesday 13 October 2015 08:59:02 steve wrote:
> Hi folks,
> 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.
> Any ideas?

As you have seen in other answers this will be pretty much impossible to get 
right. Have you considered writing some Javascript to do it client side 
instead? Something like this:

At least then (in theory) you can have the illusion of hiding the trailing 
slash without risking breaking browser support for the site.

Kind Regards
Andrew Hutchings (LinuxJedi)
Senior Developer Advocate, NGINX Inc.

More information about the nginx mailing list