MOD 重写图像 URL 掩码

发布于 2024-09-04 18:10:17 字数 370 浏览 0 评论 0原文

好的,我正在推出一个克隆的电子商务网站。我想为第二个站点的图像文件夹创建重写规则,以从第一个站点获取图像。

RewriteRule ^alice.gif$ www.rhinomart.com/images/h_home.gif

当我直接通过浏览器访问 alice.gif 时,它只是将我重定向到 rhinomart.com URL 和图像。如何防止重定向发生?当我访问 http://www.acnbiz.net/alice.gif 时,它应该获取alice.gif 直接来自 Rhinomart.com/images,而不是重定向。是否可以???

Okay so I am launching a cloned e-commerce site. I want to create a rewrite rule for the image folder for the second site to fetch images from the first site.

RewriteRule ^alice.gif$ www.rhinomart.com/images/h_home.gif

When I go to alice.gif directly through the browser it simply redirects me to the rhinomart.com URL and image. How do I prevent the redirect from occurring? When I go to http://www.acnbiz.net/alice.gif it should fetch alice.gif directly from Rhinomart.com/images and not redirect. is it possible???

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱的故事 2024-09-11 18:10:17

如果您想重写到外部站点但不重定向浏览器,那么您需要通过启用 mod_proxy 并使用 [P] 标志来代理请求。

If you want to rewrite to an external site but not redirect the browser then you will need to proxy the request by enabling mod_proxy and using the [P] flag.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文