.htaccess LiteSpeed上的自定义403错误文档
我在IP上使用了一个白名单,因此我想告诉用户为什么会这样.htaccess LiteSpeed上的自定义403错误文档,.htaccess,.htaccess,我在IP上使用了一个白名单,因此我想告诉用户为什么会这样 order deny, allow deny from all allow from 24.11.95.152 HTACCESS中的我的IP白名单^ 现在,我将ErrorDocument设置为/403 ErrorDocument 403 /403 最后我将/403重写为uhoh.php RewriteEngine On RewriteRule ^403/?$ uhoh.php [NC] 但是,我仍然从LiteSpeed中得到典型的错
order deny, allow
deny from all
allow from 24.11.95.152
HTACCESS中的我的IP白名单^
现在,我将ErrorDocument设置为/403
ErrorDocument 403 /403
最后我将/403重写为uhoh.php
RewriteEngine On
RewriteRule ^403/?$ uhoh.php [NC]
但是,我仍然从LiteSpeed中得到典型的错误。您可以将
ErrorDocument
直接用于您希望用于自定义消息的文件
在您的情况下,将如下所示:
ErrorDocument 403 /uhoh.php
从您的示例来看,您似乎在尝试双重重定向错误页面,而这并不是真正需要的。@Prix Ah,好的。谢谢,成功了!:D@Prix是的,好主意。完成;)希望你一切顺利