【发布时间】:2016-02-04 16:11:43
【问题描述】:
我想用 nginx 实现的是:
http://domain.com - redirects to http://otherdomain/page.html
http://www.domain.com - redirects to http://otherdomain/page.html
http://domain.com/* - redirects to http://otherdomain/*
基本上只有域名和 www 应该被重定向到一个 url 链接。其他所有内容都应重定向到另一个域,但保持 url 如下:
http://domain.com/subdomain/page.html -> http://otherdomain/subdomain/page.html
如果您有任何问题,请告诉我。谢谢!
【问题讨论】:
标签: mod-rewrite nginx url-rewriting rewrite