Доброго времени суток.

Пытаюсь преобразовать такую конструкцию

RewriteRule ^category-(.*)-(.*).html index.php?$2 [QSA,L,NC]
RewriteRule ^forum-(.*)-(.*).html forum.php?$2 [QSA,L,NC]
RewriteRule ^topic-(.*)-(.*).html topic.php?$2 [QSA,L,NC]

для nginx

так 

location /category {
rewrite ^/category-(.*)-(.*).html /index.php?$2 break;
}
location /forum {
rewrite ^/forum-(.*)-(.*).html /forum.php?$2 break;
}
location /topic {
rewrite ^/topic-(.*)-(.*).html /topic.php?$2 break;
}

или так 

rewrite ^/category-(.*)-(.*).html /index.php/$2 last;
rewrite ^/forum-(.*)-(.*).html /forum.php/$2 last;
rewrite ^/topic-(.*)-(.*).html /topic.php/$2 last;


Ни один вариант не срабатывает.

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

_______________________________________________
nginx-ru mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Ответить