.htaccess - 如何在不更改地址栏中的 URL 的情况下重定向到不同的域?

标签 .htaccess

我想重定向自:

domain1.com/photos

致:

domain2.com/photos

我希望地址栏中的 URL 仍显示为:

domain1.com/photos

有没有办法只使用 .htaccess 来做到这一点?

<小时/>

注意:

我的domain1.com .htaccess 文件目前完全空白。

最佳答案

不,没有办法使用 .htaccess 执行此操作。这样做会带来明显的安全漏洞 - 想象一下有人在银行网站上这样做!

关于.htaccess - 如何在不更改地址栏中的 URL 的情况下重定向到不同的域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/987343/

相关文章:

.htaccess GET 参数值到 index.php

.htaccess - robots.txt htaccess 阻止谷歌

.htaccess - 301重定向与mod_rewrite

.htaccess - htaccess : forcing https and www if not on localhost

html - SEO:hreflang 无法正常工作 - 我该如何解决?

Apache:在带有 AllowOverride None 的 conf 中包含 htaccess,性能更好?

php - htaccess 检查查询字符串是否为空

php - IP 地理位置与 Mod_Rewrite & PHP

.htaccess - 当新页面具有相同的 url 结构时进行 301 重定向

.htaccess - 将 .htaccess 指向文件