V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
lixuda
V2EX  ›  问与答

nginx 配置问题,url 调整

  •  
  •   lixuda · 2020-05-08 09:25:58 +08:00 · 743 次点击
    这是一个创建于 1439 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5472 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 09:14 · PVG 17:14 · LAX 02:14 · JFK 05:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.