我想使用以下方式重定向此网址htaccess RewriteRule
:
news/tags/video to news.php?t=video
news/tags/interview to news.php?t=interview
news/tags/news to news.php?t=news
网址:news.php?t=video, news.php?t=interview, news.php?t=news
工作正常,我正确接收了“t”变量。但是当我申请时htaccess RewriteRules
,“t”var 没有通过。
这是我的代码:
<IfModule mod_rewrite.c>
#this rules are working fine
RewriteRule ^news[/]?$ news.php
RewriteRule ^news/(.+)[/]?$ news_article.php?idN=$1
#problem rules
RewriteRule ^news/tags/video[/]?$ news.php?t=video
RewriteRule ^news/tags/interview[/]?$ news.php?t=interview
RewriteRule ^news/tags/news[/]?$ news.php?t=news
</IfModule>