Simple Rewrite Question

Daniele Melosi ml at melosi.it
Fri Jan 16 14:27:50 MSK 2009


Alan Williamson ha scritto:
> so a request:
>  http://xyz/
> would be rewritten to:
>  http://xyz/index.htm
> and so on ...
>  http://xyz/mytest/ -> http://xyz/mytest/index.htm
> BUT http://xyz/mytest is to be untouched!  Only if it has a / at the end.

try this:
rewrite ^/(.*)/$ /$1/index.htm;

Daniele





More information about the nginx mailing list