lixuda
V2EX  ›  问与答

nginx 配置问题,url 调整

  •  
  •   lixuda · May 8, 2020 · 1437 views
    This topic created in 2245 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   ·   Solana   ·   5899 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 03:02 · PVG 11:02 · LAX 20:02 · JFK 23:02
    ♥ Do have faith in what you're doing.