I have an htaccess file that contains the following line:
RewriteRule ^department/([a-z]+)/([a-z0-9_-]+)$ departmentpage.php?dep=$1&pagename=$2
I want to create a contact page and want the later specific rule override the previous, like cascading stylesheets.
The following rule looks like its getting ignored:
RewriteRule ^department/([a-z]+)/contact$ departmentpage.php?dep=$1&
Is there anyway for the 2nd more specific 开发者_StackOverflow社区rewrite to override the general rewrite?
RewriteRule ^department/([a-z]+)/([a-z0-9_-]+)$ departmentpage.php?dep=$1&pagename=$2
RewriteRule ^department/([a-z]+)/contact$ departmentpage.php?dep=$1
Switch the order of the rules (and use [L] if necessary).
精彩评论