Nginx rewrite question

Hello
I want to konw nginx rewrite ,how to write rewrite /indxe.htm to
/dir/
ex: http://xxxx.com/index.htm redirecting http://xxxx.com/

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,186516,186516#msg-186516

On Tue, Mar 29, 2011 at 01:39:05AM -0400, jinjun502 wrote:

Hello
I want to konw nginx rewrite ,how to write rewrite /indxe.htm to
/dir/
ex: http://xxxx.com/index.htm redirecting http://xxxx.com/

location = / {
try_files $uri/index.htm =404;
root /path/to/files;
}

location = /index.htm {
return 301 http://xxxx.com/;
}


Igor S.
http://sysoev.ru/en/

something like that:

location = /index.htm {
rewrite ^/.*$ http://$host? permanent;
}

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,186516,186598#msg-186598

Oh thanks It’s work

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,3921,186604#msg-186604

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs