Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
重定向URL而不显示新URL?_Url_Redirect_Mod Proxy - Fatal编程技术网

重定向URL而不显示新URL?

重定向URL而不显示新URL?,url,redirect,mod-proxy,Url,Redirect,Mod Proxy,是否可以在不显示新URL的情况下将URL重定向到另一个URL 例如: 当用户访问www.sample1.com/page1.html时,它应该显示www.sample2.com/page2.html。但URL需要显示为属于www.sample1.com,或者类似于www.subdomain.sample1.com/blah.html的内容 我需要为另一个域托管一些页面,但这些页面看起来应该属于该域或该域的子域 在我的情况下,使用iframe不是一个选项,欢迎任何其他建议 最简单的方法可能是使用m

是否可以在不显示新URL的情况下将URL重定向到另一个URL

例如:

当用户访问www.sample1.com/page1.html时,它应该显示www.sample2.com/page2.html。但URL需要显示为属于www.sample1.com,或者类似于www.subdomain.sample1.com/blah.html的内容

我需要为另一个域托管一些页面,但这些页面看起来应该属于该域或该域的子域


在我的情况下,使用iframe不是一个选项,欢迎任何其他建议

最简单的方法可能是使用
mod_proxy
在子上下文中显示所有sample2.com页面:

ProxyPass   /sample2   http://www.sample2.com
因此,
sample2.com/page2.html
将显示为
sample1.com/sample2/page2.html

否则也可能有用,特别是

希望有帮助