2012-02-27 14 views

Respuesta

6

Este:

RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,QSA,L] 

se convertirá en:

rewrite ^/(.+)/$ http://$http_host/$1 permanent; 

y esto:

RewriteRule !^(media/(.+)|favicon.ico|robots.txt|sitemap.xml|sitemap-main.xml)$ index.php 

se convertirá en:

rewrite /!^(media/(.+)|favicon.ico|robots.txt|sitemap.xml|sitemap-main.xml)$ /index.php; 

también se puede utilizar:

if ($rule_0 = ""){ 
    rewrite ^/(.+)/$ http://$http_host/$1 permanent; 
} 
if ($rule_0 = ""){ 
    rewrite /!^(media/(.+)|favicon.ico|robots.txt|sitemap.xml|sitemap-main.xml)$ /index.php; 
} 

Documentación: http://wiki.nginx.org/HttpRewriteModule

Desde: http://www.anilcetin.com/convert-apache-htaccess-to-nginx/

+0

Gracias, lo agradezco. Te recomendaría ... ¡pero aún no tengo suficiente reputación! –

+1

Puedes votar y también puedes aceptar la respuesta: http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work –

+0

Ah ok gracias, acepté - Soy nuevo a esto ... obviamente. –

Cuestiones relacionadas