我想在一个文件中写下这两个不同的规则。我该怎么做?
RewriteEngine On
RewriteCond %{REQUEST_URI} /v0\.3/forum/
RewriteRule ^(.*)$ /v0.3/test.php?forum=$1 [L,QSA]
RewriteEngine On
RewriteCond %{REQUEST_URI} /v0\.3/profile/
RewriteRule ^(.*)$ /v0.3/profiles.php?id=$1 [L,QSA]
答案 0 :(得分:3)
只需删除第二个RewriteEngine On
声明
RewriteEngine On
RewriteCond %{REQUEST_URI} /v0\.3/forum/
RewriteRule ^(.*)$ /v0.3/test.php?forum=$1 [L,QSA]
RewriteCond %{REQUEST_URI} /v0\.3/profile/
RewriteRule ^(.*)$ /v0.3/profiles.php?id=$1 [L,QSA]