2012-05-17 164 views
0

我想要所有的圖像關聯鏈接(例如「/images/filename.ext」)重定向到像「http://otherdomain.com/images/filename.ext」這樣的,關係形象的地址實際上是在尋找我曾嘗試在其他領域htaccess圖像重定向

圖像:

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

和:

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

,但無濟於事。自從我寫了的東西已經很長時間了,並沒有太好的開始;)所以有點損失。

我重新寫一些代碼的朋友,這將是很好的,如果他可以只複製並粘貼HTML成品無需擔心圖像鏈接需要改變等

回答

0

我knwoledge在這一領域也很有限,但我看了一些工作的例子在這裏,他們可以幫助你:

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

,也許這將工作到

2 ProxyPass /image http://otherdomain.com/image 
+0

但是都沒有成功。不過謝謝 – Toby