【问题标题】:Nginx rule for redirecting http://www.example.com/test to test.domain.com用于将 http://www.example.com/test 重定向到 test.domain.com 的 Nginx 规则
【发布时间】:2015-11-16 19:15:28
【问题描述】:

我需要一些帮助来编写用于将子文件夹重定向到子域的 nginx 规则,如下所示

http://www.example.com/test 到 test.domain.com

谢谢

【问题讨论】:

标签: php nginx url-rewriting


【解决方案1】:

如果您在 www.example.com 虚拟主机中,只需在配置中写下这一行:

rewrite ^/test http://test.domain.com;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-03
    • 2015-11-18
    • 1970-01-01
    • 2015-12-22
    • 2015-12-26
    • 2011-08-24
    相关资源
    最近更新 更多