Welcome! Log In Create A New Profile


Mod_rewrite on Nginx

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

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:

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

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.

Re: Mod_rewrite on Nginx
August 01, 2018 02:47AM
i have tried to install nginx as main server but i didn't know
how to mod_rewrite module: enable
can you please help me .

my script is showing the error
This page isn’t working
www.****** is currently unable to handle this request.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 346
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