我的网站的 .htaccess 文件中有以下内容
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ profile.php?membername=$1 [L]
RewriteRule ^poem/(.*)/?$ poem.php?id=$1 [L,NC]
</IfModule>
# Works
RewriteRule ^(.*)$ profile.php?membername=$1 [L]
# Does not work
RewriteRule ^poem/(.*)/?$ poem.php?id=$1 [L,NC]
如果将其全部更改为以下内容,则结果相反。
# No longer works:
RewriteRule ^(.*)$ profile.php?membername=$1 [L]
# Now works:
RewriteRule ^poem/(.*)/?$ poem.php?id=$1 [L,NC]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} -f
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule ^(.*)$ profile.php?membername=$1 [L]
RewriteRule ^poem/(.*)/?$ poem.php?id=$1 [L,NC]
</IfModule>
这是怎么回事?我不知道。