自定义404页面不起作用,请找出错误。 似乎ErrorDocument和mod_rewrite模块之间存在冲突。
RewriteCond %{HTTP:X-FORWARDED-PROTO} ^https$
RewriteRule .? - [E=HTTPS:on]
ErrorDocument 404 /404.html
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTPS:Authorization} .
RewriteRule .* - [E=HTTPS_AUTHORIZATION:%{HTTPS:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]