lixuda
V2EX  ›  问与答

nginx 配置问题,url 调整

  •  
  •   lixuda · May 8, 2020 · 1678 views
    This topic created in 2369 days ago, the information mentioned may be changed or developed.

    需求: 目录下,没有文件的全部 301 跳转到其他域名,如果有文件就执行 php

    include enable-php.conf;
    location / {
       if (!-e $request_filename) {
    	  rewrite ^/(.*)$ http://****.com/$1 permanent;
       }
    }
    

    可为什么就是不会跳转?对 nginx 不熟,大神帮忙下,谢谢

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3208 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:34 · PVG 12:34 · LAX 20:34 · JFK 23:34
    ♥ Do have faith in what you're doing.