如何在不更改地址栏中的 URL 的情况下重定向到不同的域? [英] How can I redirect to a different domain without changing the URL in the address bar?
本文介绍了如何在不更改地址栏中的 URL 的情况下重定向到不同的域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想重定向自:
domain1.com/photos
domain1.com/photos
致:
domain2.com/photos
domain2.com/photos
我希望地址栏中的 URL 仍然显示:
I want the URL in the address bar to still read:
domain1.com/photos
domain1.com/photos
有没有办法只使用 .htaccess 来做到这一点?
Is there a way to do this using only .htaccess?
我的 domain1.com 的 .htaccess 文件目前完全空白.
My .htaccess file for domain1.com is currently completely blank.
推荐答案
不,没有办法用 .htaccess 做到这一点.这样做会带来明显的安全漏洞 - 想象一下有人在银行网站上这样做!
No, there isn't a way to do this with .htaccess. Doing so would present a glaring security hole - imagine someone doing this with a bank's website!
这篇关于如何在不更改地址栏中的 URL 的情况下重定向到不同的域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文