我希望 Apache 重定向页面 site1.com/page 中的链接
比如 a href = http://site.com/something到 a href = http://site1.com/something。
它适用于使用 的相对 URL RedirectMatch
,但不适用于绝对 URL。
Redirect 和 RedirectMatch 将相对 URL 作为第一个参数,但不适用于绝对 URL 作为第一个参数。
IE
如果主机是 site.com
比
Redirect /dir htttp://site1.com
将链接 a href = /dir> 重定向到 site1.com
但
Redirect http://site.com/dir htttp://site1.com
不会将链接 a href = htttp://site.com/dir 重定向到 htttp://site1.com