URL重新显示404
URL重写不知道是不是出现了错误 显示的是404页面server
{
listen 80;
server_name hawkdisk.com www.hawkdisk.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/hawkdisk.com;
include other.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/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;
}
log_formathawk'$remote_addr - $remote_user [$time_local] $request '
'$status $body_bytes_sent $http_referer '
'$http_user_agent $http_x_forwarded_for';
access_log/home/wwwlogs/hawk.loghawk;
}
能帮我解决下吗? 没人管?:L :@:@:@:@:@:@ 回复 hu5487 的帖子
你这个规则哪有重写在里面啊! 回复 along 的帖子
www.hawkdisk.com.conf
server
{
listen 80;
server_name www.hawkdisk.com hawkdisk.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/www.hawkdisk.com;
include hawkdisk.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/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;
}
hawk.conf
rewrite ^(.*)/file-(+)\.html$ $1/viewfile.php?file_id=$2 last;
rewrite ^(.*)/viewfile-(+)-(*)\.html$ $1/downfile.php?action=view&file_id=$2&file_key=$3 last;
rewrite ^(.*)/downfile-(+)-(*)\.html$ $1/downfile.php?file_id=$2&file_key=$3 last;
rewrite ^(.*)/space-(.+)\.html$ $1/space.php?username=$2 last; 这样弄也不行 需要放到server {} 中,具体请查看nginx的静态配置规则
页:
[1]