【发布时间】:2014-10-20 09:43:38
【问题描述】:
我有两个重写规则,一个是虚 url,例如 domain.com/url,另一个是编辑一些数据,也就是帖子。
由于某种原因,只有第一条规则正在发生,而不是两者都发生
为什么会这样,我该如何解决??
这是代码
RewriteEngine On
# Make sure you only match on files/directories that don't actually exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
# Rewrite the first part after the `/` into a `username` parameter
RewriteRule ^(.+)$ groups/index.php?gname=$1 [L,QSA]
RewriteRule ^edit/id/([0-9]+)/?$ groups/view_update.php?pid=$1 [NC,QSA,L]
【问题讨论】:
标签: php .htaccess url mod-rewrite redirect