Trying to do the opposite of www.domain.com -> domain.com

mike mike503 at gmail.com
Mon Sep 1 11:43:58 MSD 2008


On 9/1/08, Igor Sysoev <is at rambler-co.ru> wrote:

> There is no difference for "root" directive. Actually, nginx deletes
> trailing slash from "root" directive because $request_file_name is
> $document_root$uri", and $uri has slash as first character.
>
> But the trailing slash is important for "alias" directive, because
> "alias" literally replaces location part of URI:
>
> location /dir/ {
>     alias  /path/to/;
> }
>
> /dir/file > /path/to/file

Gotcha. Thanks.





More information about the nginx mailing list