0

我希望将所有图像的关系链接(例如“/images/filename.ext”)重定向到“http://otherdomain.com/images/filename.ext”之类的东西,以便关系图像地址实际上是寻找其他域上的图像

我努力了:

RewriteEngine On
RewriteRule ^images/(.*)$ http://otherdomain.com/images/$1 [NC, P]

和:

RedirectPermanent /images http://otherdomain.com/images

但无济于事。自从我写东西以来已经有很长时间了,而且一开始也不是很好;)所以有点茫然。

我正在为朋友重新编写一些代码,如果他可以复制并粘贴完成的 HTML 而不必担心需要更改的图像链接等,那就太好了。

4

1 回答 1

0

我在这方面的知识也非常有限,但我在这里查看了一些工作示例,它们可能会对您有所帮助:

1 RewriteRule (^/image/.*) http://otherdomain.com$1 [P]

也许这会起作用

2 ProxyPass /image http://otherdomain.com/image
于 2012-05-18T07:07:21.390 回答