- 論壇徽章:
- 0
|
本帖最后由 hao3721 于 2014-12-15 19:56 編輯
各位好,我用了CI框架,現(xiàn)有個需求想將
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;
}
請問哪里不正確呢?應(yīng)該怎么改正?謝謝! |
|