zoukankan      html  css  js  c++  java
  • nginx 环境 thinkphp 隐藏index.php

    tp官网已经写了 http://doc.thinkphp.cn/manual/hidden_index.html

    不生效 重启nginx .问题依旧

    kill掉nginx进程  再启动

    贴段自己的配置:

    server {
    listen 80;
    server_name url;
    root /*/*/*;

    #include conf.d/ipFilter.conf;
    #access_log /data/logs/$server_name.access.log main;

    if ($http_user_agent ~ "DNSPod") {

    return 200;

    }

    try_files $uri $uri/ @rewrite;

    #隐藏index.php

    location / {

           if (!-e $request_filename) {

                   rewrite ^(.*)$ /index.php?s=$1 last;
                  break;

    #pathinfo模式

    location ~ .php {

    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;

    fastcgi_split_path_info ^(.+.php)(.*)$;
    fastcgi_param PATH_INFO $fastcgi_path_info;

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }

    }

  • 相关阅读:
    jquery animate() stop() finish() 方法使用
    ant 相关命令
    ant 安装 网址
    邮件
    webdriver until
    python HTML报告
    登录
    yun
    centos7搭建smb服务
    爬取图片
  • 原文地址:https://www.cnblogs.com/xiaommvik/p/7677668.html
Copyright © 2011-2022 走看看