Welcome! Log In Create A New Profile

Advanced

Rewrite in Ngnix

Posted by xxx 
xxx
Rewrite in Ngnix
April 21, 2012 08:20AM
Hi,
How convert to httacces from apache to nginx

My file htaccess is:

#Options FollowSymLinks

RewriteEngine on

RewriteRule ^vardata/(.*).php$ [R=404,L]
RewriteRule ^([a-zA-Z0-9_-]+).html$ index.php?op=$1
RewriteRule ^([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+).html$
index.php?op=$1&do=$2
RewriteRule ^([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+).html$
index.php?op=$1&do=$2&id=$3
RewriteRule
^([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+).html$
index.php?op=$1&do=$2&id=$3&qs=$4
RewriteRule
^([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+).html$
index.php?op=$1&do=$2&id=$3&qs=$4&ne=$5
RewriteRule
^([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+).html$
index.php?op=$1&do=$2&id=$3&qs=$4&ne=$5&nr=$6
RewriteRule
^([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+).html$
index.php?op=$1&do=$2&id=$3&qs=$4&ne=$5&nr=$6&ha=$7
RewriteRule
^([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+),([a-zA-Z0-9_-]+).html$
index.php?op=$1&do=$2&id=$3&qs=$4&ne=$5&nr=$6&ha=$7&hs=$8 [L]


HELP Me!

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Jonathan Matthews
Re: Rewrite in Ngnix
April 21, 2012 03:10PM
On 21 April 2012 07:11, xxx <[email protected]> wrote:
> Hi,
> How convert to httacces from apache to nginx
> HELP Me!

Step 1: Read and understand the documentation at http://nginx.org/r/rewrite
Step 2: Understand what your existing rewrite rules are doing
Step 3: Rewrite your rewrite rules

Let us know how you get on and also -- if you get stuck -- what you've
tried, what's worked, and what hasn't worked.

Cheers,
Jonathan
--
Jonathan Matthews
Oxford, London, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
xxx
Re: Rewrite in Ngnix
April 22, 2012 11:00AM
Please help me, i can not run my nginx because i haven't good rewrite
rules

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Jonathan Matthews
Re: Rewrite in Ngnix
April 22, 2012 11:40AM
No. You must try translating your Apache rewrite rules to start with.
Show us what you try, and where you get stuck - then someone may be
willing to help you understand what you've got wrong.

No-one here should just do the whole thing for you if you're too lazy
even to try for yourself.

Jonathan
--
Jonathan Matthews
Oxford, London, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login