php - 错误文档 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]
解决方案
推荐阅读
- python - 如何在电影评分推荐系统中为我的模型准确性应用归一化平均绝对值::
- angular - Why is the format 'HH:mm' not working in this DatePipe?
- c++ - 函数结束后指针会死吗?
- reactjs - 如果与 DefinePlugin 一起使用,将应用程序部署到 Heroku 不起作用
- ios - NSURLCache cachedResponseForRequest 被调用两次
- login - Keycloak - Multi/2FA Factor - OTP - QR Code - 自定义登录屏幕 - Rest API
- recursion - Trying to understand clojure Fibonacci recursion
- python - How to authenticate in MySQL RDS using IAM DB Authentication and Python
- eclipse - 在 Eclipse 中使用 jsp、java servlet 和 mysql(wamp 服务器)自动生成一个employeeID
- php - 这个 php 代码有什么问题没有插入数据库