只用文件夹结构代理一个网站的脚本?
我正在寻找一种代理脚本(或者可能是一些 .htaccess voodoo**),它只允许代理一个域,同时保持文件夹结构完整。理想情况下,我还会给它一个通配符 DNS,它也会处理子域,但这不是必需的,因为我也可以设置代理几次(每个子域一次)。
所以说原始网站是 someawesomesite.com。我的代理位于 myawesomeproxy.com。我希望能够访问 myawesomeproxy.com/thisawesomedocument.html 并看到与访问 someawesomesite.com/thisawesomedocument.html 时相同的内容。
另外,我的主机只有 PHP,没有 CGI 或 ASP 等,所以它需要使用 PHP(或者正如我之前所说,如果你们能编出一些 .htaccess 巫术,那就太棒了!)
基本上 他们在这里完成了什么,但使用的是海盗湾以外的另一个网站...
** 我不是服务器所有者(共享主机),所以我无法安装 Apache 插件或编辑配置。
I'm looking for a proxy script (or possibly some .htaccess voodoo**) that allows just one domain to be proxied, while keeping the folder structure intact. Ideally I would also give it a wildcard DNS and it would do subdomains too, but that's not necessary because I can also just set up the proxy a few times (once for each subdomain).
So say the original site is someawesomesite.com. And my proxy is at myawesomeproxy.com. I want to be able to go to myawesomeproxy.com/thisawesomedocument.html and see the same as I would when I would go to someawesomesite.com/thisawesomedocument.html.
Also, my hoster only has PHP, no CGI or ASP etc. so it would need to be in PHP (or as I said before if you guys could cook up some .htaccess voodoo, that would be awesome too!)
Basically what they pulled off over here but with another site than The Pirate Bay...
** I'm not the server owner (shared hosting), so I can't install Apache plugins or edit configs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
P
(代理标志)。请记住,要使其正常工作,应启用mod_proxy
。假设目录结构相同&
mod_proxy
由您的共享主机启用。 尝试这个:You can use the
P
(proxy flag). Remember for this to workmod_proxy
should be enabled.Assuming that the directory structure are the same &
mod_proxy
is enabled by your shared hosting. Try this: