我的
.htaccess
规则全部删除
.html
和
.php
从URL扩展。
但是我需要排除一个特定的
php
来自此规则的文件,例如
mailscript/sendmail.php
在我现有的规则配置中,这是如何实现的?
.h访问
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
AddHandler server-parsed .html .htm
RewriteEngine on
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
我试图申请
RewriteRule ^sendmail\.php$ [L]
基于
on this answer
但这不符合我目前的规则。