ErrorDocument disbales .htaccess文件

时间:2017-04-05 16:35:06

标签: .htaccess errordocument

如果我将Theorem g: blah -> blah -> blah. Proof. intros. match goal with | [ |- ?p] => my_auto_unfold p end. auto. Qed. 指令添加到ErrorDocument文件,则一切都会停止工作。现在知道我的错误在哪里。然后我删除.htaccess指令,一切都有效。

我尝试使用相对于文档根目录或完整网址的路径。 我还尝试在文档根目录ErrorDocument中创建一个单独的文件夹并引用它/err/errMsg.php,然而,重定向到ErrorDocument 100 http://localhost/domainname.biz/err/errMsg.php会更好。

我的文档根目录是:

public/index.php/err/err action
DOCUMENT_ROOT /home/name/public_html/domainname.biz on server DOCUMENT_ROOT ...../apache2/htdocs on localhost

.htaccess个文件:

localhost
服务器上的

ErrorDocument 100 /domainname.biz/public/index.php/err/err #i also used ErrorDocument 100 http://localhost/domainname.biz/public/index.php/err/err ErrorDocument 101 /domainname.biz/public/index.php/err/err ErrorDocument 102 /domainname.biz/public/index.php/err/err ErrorDocument 200 /domainname.biz/public/index.php/err/err ErrorDocument 201 /domainname.biz/public/index.php/err/err ErrorDocument 202 /domainname.biz/public/index.php/err/err ErrorDocument 203 /domainname.biz/public/index.php/err/err ErrorDocument 204 /domainname.biz/public/index.php/err/err ErrorDocument 205 /domainname.biz/public/index.php/err/err ErrorDocument 206 /domainname.biz/public/index.php/err/err ErrorDocument 207 /domainname.biz/public/index.php/err/err ErrorDocument 226 /domainname.biz/public/index.php/err/err ErrorDocument 300 /domainname.biz/public/index.php/err/err ErrorDocument 301 /domainname.biz/public/index.php/err/err ErrorDocument 302 /domainname.biz/public/index.php/err/err ErrorDocument 303 /domainname.biz/public/index.php/err/err ErrorDocument 304 /domainname.biz/public/index.php/err/err ErrorDocument 305 /domainname.biz/public/index.php/err/err ErrorDocument 306 /domainname.biz/public/index.php/err/err ErrorDocument 307 /domainname.biz/public/index.php/err/err ErrorDocument 400 /domainname.biz/public/index.php/err/err ErrorDocument 401 /domainname.biz/public/index.php/err/err ErrorDocument 402 /domainname.biz/public/index.php/err/err ErrorDocument 403 /domainname.biz/public/index.php/err/err ErrorDocument 404 /domainname.biz/public/index.php/err/err ErrorDocument 405 /domainname.biz/public/index.php/err/err ErrorDocument 406 /domainname.biz/public/index.php/err/err ErrorDocument 407 /domainname.biz/public/index.php/err/err ErrorDocument 408 /domainname.biz/public/index.php/err/err ErrorDocument 409 /domainname.biz/public/index.php/err/err ErrorDocument 410 /domainname.biz/public/index.php/err/err ErrorDocument 411 /domainname.biz/public/index.php/err/err ErrorDocument 412 /domainname.biz/public/index.php/err/err ErrorDocument 413 /domainname.biz/public/index.php/err/err ErrorDocument 414 /domainname.biz/public/index.php/err/err ErrorDocument 415 /domainname.biz/public/index.php/err/err ErrorDocument 416 /domainname.biz/public/index.php/err/err ErrorDocument 417 /domainname.biz/public/index.php/err/err ErrorDocument 422 /domainname.biz/public/index.php/err/err ErrorDocument 423 /domainname.biz/public/index.php/err/err ErrorDocument 424 /domainname.biz/public/index.php/err/err ErrorDocument 426 /domainname.biz/public/index.php/err/err ErrorDocument 500 /domainname.biz/public/index.php/err/err ErrorDocument 501 /domainname.biz/public/index.php/err/err ErrorDocument 502 /domainname.biz/public/index.php/err/err ErrorDocument 503 /domainname.biz/public/index.php/err/err ErrorDocument 504 /domainname.biz/public/index.php/err/err ErrorDocument 505 /domainname.biz/public/index.php/err/err ErrorDocument 506 /domainname.biz/public/index.php/err/err ErrorDocument 507 /domainname.biz/public/index.php/err/err ErrorDocument 510 /domainname.biz/public/index.php/err/err Options -MultiViews Options -Indexes Options +FollowSymlinks # +FollowSymLinks must be enabled for any rules to work, this is a security requirement of the rewrite engine. # Normally it's enabled in the root and you shouldn't have to add it, but it doesn't hurt to do so, # Although highly unlikely, your host may have +FollowSymLinks enabled at the root level, # yet disallow its addition in .htaccess; in which case, adding +FollowSymLinks will break your setup # (probably a 500 error), so just remove it, and your rules should work fine. RewriteEngine on RewriteBase / IndexIgnore * RewriteCond %{HTTP_HOST} ^domainname\.biz [NC] RewriteCond %{HTTPS} off RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} RewriteCond %{HTTP_HOST} ^www.domainname\.biz [NC] RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{ENV:REQUEST_FILENAME} !-d RewriteCond %{ENV:REQUEST_FILENAME} !-f RewriteCond %{ENV:REQUEST_FILENAME} !-l RewriteRule ^index.php?(.+)$ index.php?url=$1 [QSA,L] 文件是相同的,但我从另一个文档根

开始
.htaccess

1 个答案:

答案 0 :(得分:1)

不确定为什么.htaccess中有这么多ErrorDocument行:

至少删除不受支持的回复代码306的行,以避免在您的网站上出现500内部错误。

您还应该删除响应代码200的处理,因为状态良好。