我已经链接到我的网站,这些链接是用户单击的,不是直接在我的控件中进行更改或正确编码的。
URL看起来像这样
http://mywebsite.com?email=%%[email protected]
我希望禁止该URL并防止错误403
[在其他问题上,人们说这是“ mod_security的10_asl_rules.conf导致此错误。”我搜索了它,但在PHP信息页上找不到mod_security
这是我的.htaccess文件的外观
<IfModule mod_rewrite.c>
Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} (.+)=[%25][%25](.+)
RewriteRule (.*) $1/?%1=%2 [R=301,L,NC]
ErrorDocument 403 "We are working on it..."
</IfModule>
您可以在htaccess文件中尝试类似的操作(已测试,确定为好:)>
Options +FollowSymlinks -MultiViews RewriteEngine on RewriteCond %{QUERY_STRING} ^/?(.+)=[%25][%25](.+) RewriteRule (.*) $1/?%1=%2 [R=301,L,NC]
重定向
http://mywebsite.com?email=%%[email protected]
例如,http://mywebsite.com/[email protected]
。>
确保在进行任何测试之前清除浏览器缓存。
您可以将标志更改为[R,L,NC]以进行生产。