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

    location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
    if (!-e $request_filename){
    rewrite ^(.*)$ /index.php?q=$1 last;
    break;
    }
    }

    location / {
    index index.html index.htm index.php;
    autoindex on;
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
    if (!-e $request_filename){
    rewrite ^(.*)$ /index.php?$1 last;
    break;
    }
    }

    location /qq/ {
    index index.html index.htm index.php;
    autoindex on;
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
    if (!-e $request_filename){
    rewrite ^(.*)$ /qq/index.php?=$1 last;
    break;
    }
    }


    pasting
  • 相关阅读:
    接口内容小结
    接口的静态方法与私有方法
    接口的默认方法
    发红包O
    抽象
    《大道至简》读后感
    重写
    继承中的二义性问题
    数学应用
    继承
  • 原文地址:https://www.cnblogs.com/fanhuo/p/9419476.html
Copyright © 2011-2022 走看看