SEO gone mad...

Aleksandar Lazic al-nginx at
Mon Oct 12 21:19:28 UTC 2015

Hi steve.

Am 12-10-2015 21:59, schrieb steve:
> Hi folks,
> I have a requirement from a customer that the terminal slash be
> rewritten when accessing the homepage - eg is a 301 to

But the solution below will not work due to the fact that most browser 
add a trailing / if there is none.
Mybe the customer want to redirect to a 'index-page'?

e.g.: index.php, or to a *_pass?

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

location = / {
     # this will work for curl but for browsers?!
     return 301;


More information about the nginx mailing list