全球主机交流论坛
标题:
求助lnmp怎么设置404页啊
[打印本页]
作者:
xtmp
时间:
2010-10-30 13:15
标题:
求助lnmp怎么设置404页啊
rt
作者:
小夜
时间:
2010-10-30 13:31
配置CONF文件,error_page 404 /index.php;举例:
server
{
listen 80;
server_name www.419.at;
index index.html index.htm index.php default.html default.htm default.php;
root /home/www/419.at;
error_page 404 /index.php;
include typecho.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
复制代码
作者:
mslxd
时间:
2010-10-30 13:33
楼上的强,做个记号
作者:
Globalization
时间:
2010-10-30 13:37
error_page 404
http://loc.998820.xyz/
;
也可以
作者:
nike_tool
时间:
2010-10-30 13:45
标题:
回复 2# 的帖子
不要跳转到主页呀 会出问题的哦
作者:
xtmp
时间:
2010-10-30 13:50
不需要在nginx。conf文件中先添加
fastcgi_intercept_errors on;
?
直接在虚机配置文件中加error_page 404 /index.php;就可以了?
作者:
serverpoint
时间:
2010-10-30 14:00
提示:
作者被禁止或删除 内容自动屏蔽
作者:
amotic.tech
时间:
2010-10-30 14:04
提示:
作者被禁止或删除 内容自动屏蔽
作者:
麦田
时间:
2010-10-30 14:06
原帖由
amotic.tech
于 2010-10-30 14:04 发表
想请问一下,如果404页,我想转到一个指定的文件请问如何做..
error_page 404
/index.php
应该就是修改红字部分吧
作者:
小夜
时间:
2010-10-30 14:18
error_page 404 /404.php;
404.php 源码
<? header("location:http://www.419.at"); ?>
复制代码
欢迎光临 全球主机交流论坛 (https://loc.998820.xyz/)
Powered by Discuz! X3.4