Welcome! Log In Create A New Profile

Advanced

Rewrite rule ?

Posted by beachbum 
Rewrite rule ?
September 06, 2011 09:34AM
Hello, I am a noob to nginx and I have a simple rewrite rule? I have searched for this answer but all i can find are complicated rewrite examples.

how would I convert the .htaccess rule of:

Redirect 301 "/sud-dir1/sub-dir2/file name with spaces.htm" http://mydomain.com/file-name/

The reason I am doing this is to redirect an old page that is indexed by google and linked to by others to its new home

Thanx



Edited 2 time(s). Last edit at 09/06/2011 09:37AM by beachbum.
Re: Rewrite rule ?
September 10, 2011 09:14AM
rewrite ^\/sub-dir1\/sub-dir2\/file\sname\swith\sspaces\.htm$ http://mydomain.com/file-name/ permanent;

Cheers,

Andrejs
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready