Welcome! Log In Create A New Profile

Advanced

Mod_rewrite on Nginx

Posted by Prince 
Mod_rewrite on Nginx
November 06, 2010 04:01PM
Hello,

I was using Apache webserver and I changed to Nginx
I had the following mod_rewrite (.htaccess) on Apache,
now I want to use this mod_rewrite on Nginx.
how can I convert them and where exactly I need to put them.
can anyone convert this and show me how to use and where to put them?
I'm a newbie to this codes ,
Here is the code:

[code]
RewriteEngine On
RewriteRule ^index\.html$ ./index.php?mdrw=on
RewriteRule ^manual\.html$ ./index.php?action=manual&mdrw=on
RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3&mdrw=on
RewriteRule ^([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vtopic&forum=$1&page=$2&mdrw=on
[/code]

Thanks
Re: Mod_rewrite on Nginx
November 10, 2010 03:32AM
Rewrites can go into the server{} section of your nginx configuration. A quick read of this page will help you figure out how to translate mod_rewrite directives to nginx's HTTP rewrite module syntax.

http://wiki.nginx.org/NginxHttpRewriteModule
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 156 on March 20, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready