# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteRule ^validation$ validation.php [L]
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
2条答案
按热度按时间fhg3lkii1#
编辑:
mkh04yzy2#
对于想要删除特定文件扩展名的WordPress用户,请确保将其包含在索引重写规则之前,这样它就可以匹配它。这可以在WordPress环境中删除特定文件(validation.php)的.php扩展名(注意我是如何在
<IfModule mod_rewrite.c>
之后添加规则的),使yourwebsite.com/validation工作。