如何在不更改地址栏中的 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!