htaccess的负荷另一个文件 [英] .htaccess Load as another file
本文介绍了htaccess的负荷另一个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图建立我的htaccess的,让我去domain.com/file.html~~V并将其加载otherdomain.com/file.html
I'm trying to set up my htaccess to allow me to go to domain.com/file.html and have it load up otherdomain.com/file.html
下面是我目前htaccess的文件,但它运行的时候,它只是我重定向到另一个文件。
Here's my current htaccess file, but when it runs, it just redirects me to the other file.
RewriteEngine On
RewriteRule file.html http://mydomain.com/file.html [L]
我在做什么错在这里?
What am I doing wrong here?
谢谢你们。
推荐答案
您需要使用的mod_proxy
对于这一点,你的要求(假设你加载模块)与的 P
标记。
You need to use mod_proxy
for that, which you request (assuming you have that module loaded) with the P
flag.
RewriteRule file.html http://mydomain.com/file.html [P]
需要注意的是P蕴含升。
Note that P implies L.
这篇关于htaccess的负荷另一个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文