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
  • 相关阅读:
    C++中头文件包含的问题
    linux环境变量
    win32进程和线程
    断言
    win32中的常用类型转换
    可变形参
    #define
    CString与char*互相转化
    extern
    手机CPU和GPU厂商
  • 原文地址:https://www.cnblogs.com/fanhuo/p/9419476.html
Copyright © 2011-2022 走看看