CodeIgniter3.0+Nginx的伪静态配置

来源:互联网 发布:actionscript 3 源码 编辑:程序博客网 时间:2024/06/05 01:56

server{listen 80;server_name www.ju.com ju.com *.ju.com;index index.php;root  /data/wwwroot/ju_2_1;#error_page   404   /404.html;location / {    index index.php;if (!-e  $request_filename) {rewrite ^/(.*)$ /index.php last;}if ($host = 'ju.com') {                rewrite ^/(.*) http://www.ju.com/$1 permanent;            }        }location ~ [^/]\.php(/|$){# comment try_files $uri =404; to enable pathinfotry_files $uri =404;fastcgi_pass  unix:/tmp/php-cgi.sock;fastcgi_index index.php;include fastcgi.conf;#include pathinfo.conf;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires      30d;}location ~ .*\.(js|css)?${expires      12h;}access_log  /home/wwwlogs/ju.log  access;}



0 0
原创粉丝点击