CI框架在nginx下rewrite的问题
各位好,我用了CI框架,现有个需求想将
http://xxxx.com/game/info/28 替换成 http://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;
if (!-f $request_filename) {
rewrite . /index.php last;
}
location ~ [^/]\.php(/|$)
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
#rewrite /game/index/$1 /game/(.*?).html last;
rewrite /game/$1.html /game/index/(.*?) last;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/$server_name access;
}
请问哪里不正确呢?应该怎么改正?谢谢!