Доброго времени суток.
Пытаюсь преобразовать такую конструкцию
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;
Ни один вариант не срабатывает.
Пытаюсь преобразовать такую конструкцию
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;
Ни один вариант не срабатывает.