简体   繁体   English

使用.htaccess的自定义404页面

[英]Custom 404 pages using .htaccess

hi guys can you help be me 大家好,你能帮我吗

im having a problem in ridecting my customize 404 error page 即时通讯在我的自定义404错误页面中遇到问题

this my htaccess code: 这是我的htaccess代码:

<IfModule mod_rewrite.c>
   RewriteEngine On 

   RewriteCond %{SCRIPT_FILENAME} !-f
   RewriteCond %{SCRIPT_FILENAME} !-d


   RewriteRule ^home index.php [NC,L]

   RewriteRule ^works works.php [NC,L]

   RewriteRule ^category/([0-9a-zA-Z_-]+) category.php?cat=$1 [NC,L]

   ErrorDocument 404 /404.html


</IfModule>

can help to fixed this prpblem 可以帮助修复此问题

this is the ERROR 这是错误

Not Found 未找到

The requested URL /fur/cate was not found on this server. 在此服务器上找不到请求的URL / fur / cate。

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 此外,尝试使用ErrorDocument处理请求时遇到404 Not Found错误。

Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.9 Server at localhost Port 8080 本地端口8080上的Apache / 2.4.7(Win32)OpenSSL / 1.0.1e PHP / 5.5.9服务器

Options -MultiViews 选项-MultiViews

RewriteEngine On

# Redirect to HTTPS
#RewriteCond %{HTTPS} !on
#RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Redirect Trailing Slashes If Not A Folder...
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond $1 !^(cron\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

override this file 覆盖此文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM