SEO gone mad...

Lukas Tribus luky-37 at hotmail.com
Tue Oct 13 10:20:36 UTC 2015


> I'm apparently trying to do something that apache can, but so far,
> nothing has worked - everything just ends in a loop.

No, you cannot do this, see [1]:

> If the target URI's path component is empty, the client MUST
> send "/" as the path within the origin-form of request-target.

An empty request will always lead to a "GET / HTTP/1.1" request,
"GET HTTP/1.1" is invalid.

There is not distinction at HTTP layer between:
example.com
and
example.com/

Therefor, it will always loop. Apache can't do this either,
this is simply how HTTP works.

You can only do this with subdirectories, in both nginx
and apache (and every other webserver for that matter),
because both of the following requests are valid:
"GET example.com/subdir/ HTTP/1.1"
or
"GET example.com/subdir HTTP/1.1"

But *not* with "/".



Regards,

Lukas

[1] https://tools.ietf.org/html/rfc7230#section-5.3.1 		 	   		  


More information about the nginx mailing list