我将htaccess配置为重写所有文件名
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^contst/(.*)$ /contst/index.html?doc=$1 [L,NC]
如何排除特定文件(contst / blahblah.php)被此代码选中?
答案 0 :(得分:1)
RewriteRule ^contst/blahblah\.php$ - [L]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^contst/(.*)$ /contst/index.html?doc=$1 [L,NC]
或
RewriteCond $1 !^blahblah\.php$
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^contst/(.*)$ /contst/index.html?doc=$1 [L,NC]