【发布时间】:2014-02-02 11:37:40
【问题描述】:
我的 htaccess 中已经有这个重写规则
RewriteCond $1 !^(index\.php)
RewriteRule ^([^/]*)/([^/]*)\.html$ /index.php?id_user=$1&page=$2 [L]
http://www.mydomain.com/index.php?id_user=user&page=news
http://www.mydomain.com/user/news.html
现在我对新闻详情和活动详情有疑问。
因为有这样的网址(仅适用于页面新闻):
http://www.mydomain.com/user/details-news/category/title-news.html
还有这个(仅用于页面事件)
http://www.mydomain.com/user/event/title-event.html
我可以在 htaccess 中插入新规则以获得这些规则还是我必须编辑我的实际规则?
我的网址对于所有查询都是相同的
index.php?id_user=user&page=details-news&category=category&title=title-news
or
index.php?id_user=user&page=event&title=title-event
任何帮助将不胜感激!
【问题讨论】:
标签: php apache .htaccess mod-rewrite url-rewriting