- 论坛徽章:
- 0
|
本帖最后由 hao3721 于 2014-12-15 19:56 编辑
各位好,我用了CI框架,现有个需求想将
xxxx.com/game/info/28 替换成 xxxx.com/game/28.html
附本人的nginx.conf如下:
server
{
listen 80;
server_name xxxx.com;
index index.html index.htm index.php default.html default.htm default.php;
root /mnt/hgfs/xxxx.com;
location ~ [^/]\.php(/|$)
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
if (!-f $request_filename) {
rewrite . /index.php last;
}
location ~* /game/index{
rewrite /game/(\d*?).html /index.php/game/index/$1 last;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/$server_name access;
}
请问哪里不正确呢?应该怎么改正?谢谢! |
|