首页 > 解决方案 > 错误文档 404“消息”指令在 .htaccess 中不起作用

问题描述

我做了几天的任何事情,.htaccess 404 不起作用。我尝试了数百种方法,但在我的 httaccess 中我没有再次得到它:

RewriteEngine on

ErrorDocument 404 "test comment"

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l


RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://spahan.ir/$1 [R=301,L]

       RewriteCond %{HTTPS_HOST} ^www\.spahan\.ir$
       RewriteRule ^/?$ "https\:\/\/spahan\.ir\/" [R=301,L]


RewriteCond %{HTTPS_HOST} ^spahan.ir [NC]
RewriteRule ^(.*)$ http://www.spahan.ir/$1 [L,R=301,NC]

标签: phpapache.htaccesscpanel

解决方案


推荐阅读