错误文档404“消息”指令在.htaccess中不起作用

时间:2019-06-02 10:00:18

标签: php apache .htaccess cpanel

我做了几天的事情,.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]

0 个答案:

没有答案