码迷,mamicode.com
首页 > Web开发 > 详细

nginx服务器怎样去掉url中的index.php

时间:2015-08-12 06:36:48      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:

 server {
        listen          80;
        server_name     yourdomain.com;
        root            /home/yourdomain/www/;
        index           index.html index.htm index.php;

        if (!-e $request_filename) {
            rewrite ^(.*)$ /index.php$1 last;
        }

        location ~ .*\.php(\/.*)*$ {
            include fastcgi.conf;
            fastcgi_pass  127.0.0.1:9000;
        }

        access_log logs/yourdomain.log combined;
    }

  

nginx服务器怎样去掉url中的index.php

标签:

原文地址:http://www.cnblogs.com/thrillerz/p/4722878.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!