.htaccess规则问题
我目前正在使用 .htaccess 为我的页面编写规则。
我有一个论坛,其原始 URL 是:?i=f,
然后将其重写为:
RewriteRule ^forum /?i=f [L]
This Works。虽然我的问题来了。当我希望深入到页面、论坛的类别时,实际的 URL 是: ?i=f&p=t&cid=ID
我尝试做的是这条规则:
RewriteRule ^forum/cat/([^/]*)$ /?i=f&p=t&cid=$1 [L]
尽管这不起作用,因为 /forum 已经定义了。我该怎么做?
谢谢。
I am currently writing rules for my pages, with .htaccess.
I have a forum, the original URL of this is: ?i=f
This will then be rewritten to:
RewriteRule ^forum /?i=f [L]
This works. Although here comes my problem. When I wish to go deeper into the pages, to the categories of the forum, the actual URL is: ?i=f&p=t&cid=ID
What I try to do is this rule:
RewriteRule ^forum/cat/([^/]*)$ /?i=f&p=t&cid=$1 [L]
Although that does not work, since the /forum is already defined. How can I do this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
删除
RewriteRule ^forum /?i=f [L]
并添加以下规则:
Remove
RewriteRule ^forum /?i=f [L]
and add Just this rule: