如何重写这种url?
How to rewrite this kind of url?
如何在nginx中重写这种url
http://example.org/index.php?p=discussion/7/topic
进入这个
http://example.org/discussion/7/topic
我使用了位置
/forum {try_files $uri $uri/ @forum;}
location @forum {rewrite ^/forum(.+)$ /forum/index.php?p= last;}
谢谢指教:)
问题已解决。从 Srgrn 重写 url 是正确的,我只是愚蠢,没有检查我到 CSS 的路线。谢谢。
如何在nginx中重写这种url
http://example.org/index.php?p=discussion/7/topic
进入这个
http://example.org/discussion/7/topic
我使用了位置
/forum {try_files $uri $uri/ @forum;}
location @forum {rewrite ^/forum(.+)$ /forum/index.php?p= last;}
谢谢指教:)
问题已解决。从 Srgrn 重写 url 是正确的,我只是愚蠢,没有检查我到 CSS 的路线。谢谢。