zoukankan      html  css  js  c++  java
  • nginx 下 yii 隐藏 index.php

    vhosts.conf中添加

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

    一个网站完整配置

    server {
            listen       8848;
            server_name  hyx.com hyx.com;
            root   "D:/phpstudy_prol/WWW/hyx_wuliu_api/web";
            location / {
                index index.php index.html;
                autoindex  off;
                #nginx ignore index.php
                if (!-e $request_filename){  
                  rewrite ^/(.*) /index.php last;  
                }   
            }
            location ~ .php(.*)$ {
                fastcgi_pass   127.0.0.1:9001;
                fastcgi_index  index.php;
                fastcgi_split_path_info  ^((?U).+.php)(/?.+)$;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                fastcgi_param  PATH_INFO  $fastcgi_path_info;
                fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
                include        fastcgi_params;
            }
    }

     

  • 相关阅读:
    QT中的列表容器
    QT中的Buttons
    QT中的常用控件
    [机房测试]弟娃
    CF1580C Train Maintenance
    [机房测试]数据恢复
    Sentry 监控
    Sentry 监控
    Sentry 监控
    Sentry 后端监控
  • 原文地址:https://www.cnblogs.com/sw-3/p/11213464.html
Copyright © 2011-2022 走看看