找回密码
 立即注册
查看: 1962|回复: 0

求教这个NGINX的伪静态

[复制链接]

已分享文件:0个

网盘今日赚:积分

发表于 2014-3-8 14:43:12 | 显示全部楼层 |阅读模式
location / {
rewrite ^(.*)/$ $1/index.php last;
rewrite ^(.*)/file/([0-9]+)$ $1/viewfile.php?file_id=$2 last;
rewrite ^(.*)/downfile/([0-9]+)/([0-9]+)$ $1/download.php?file_id=$2&key=$3 last;
rewrite ^(.*)/viewfile/([0-9]+)/([0-9]+)$ $1/viewfile.php?file_id=$2&key=$3 last;
rewrite ^(.*)/cate/([0-9]+)$ $1/public.php?cate_id=$2 last;
rewrite ^(.*)/share.html$ $1/public.php last;
rewrite ^(.*)/tag/([a-zA-Z0-9]*)$ $1/tag.php?tag=$2 last;
rewrite ^(.*)/tag.html$ $1/tag.php last;
rewrite ^(.*)/hotfile/([a-zA-Z0-9]*)/([0-9]+)$ $1/hotfile.php?o_type=$2&cate_id=$3 last;
rewrite ^(.*)/hotfile/([a-zA-Z0-9]*)$ $1/hotfile.php?o_type=$2 last;
rewrite ^(.*)/hotfile.html$ $1/hotfile.php last;
rewrite ^(.*)/down/([0-9]+)$ $1/download.php?file_id=$2 last;
rewrite ^(.*)/announce/([0-9]+)$ $1/ann_list.php?aid=$2 last;
rewrite ^(.*)/announce.html$ $1/ann_list.php last;
rewrite ^(.*)/([a-zA-Z0-9]*)$ $1/space.php?username=$2 last;
rewrite ^(.*)/([a-zA-Z0-9]*)/([0-9]+)$ $1/space.php?username=$2&folder_id=$3 last;

}

有个页面可以访问,有的不能访问。PHP文件已经修改!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|PHPDisk系统交流社区

GMT+8, 2024-12-4 16:55 , Processed in 0.060416 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表