nginx redirect with regexp

Posted by nginxnoob on Server Fault See other posts from Server Fault or by nginxnoob
Published on 2010-03-07T20:08:16Z Indexed on 2010/03/08 0:32 UTC
Read the original article Hit count: 477

Filed under:

I had an old site that was built with ASP, the homepage url looked like this "www.hifimaven.com/index.asp". But now the new site is built on top of RubyOnRails using nginx. and the new url to the homepage "www.hifimaven.com".

How can I tell nginx to redirect to the new homepage url if the user types the old url instead of showing a 404 page.

© Server Fault or respective owner

Related posts about nginx