mercredi 29 avril 2015

How to Converting this specific apache “RewriteCond” rules to nginx

I am moving from an Apache to nginx and need to convert RewriteCond rules to nginx.

DirectoryIndex /public/index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.+) $1 [L]
RewriteCond %{DOCUMENT_ROOT}/public%{REQUEST_URI} -f
RewriteRule ^(.+) /public/$1 [L]

RewriteEngine on 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /public/index.php?q=$1 [L,QSA]

#RewriteRule !\.(js|ico|gif|jpg|png|css|xml|xslt)$ /public/index.php

Aucun commentaire:

Enregistrer un commentaire