views:

56

answers:

2

Our website currently servers images from a website.com/images/ folder.

Thing is we have limited bandwidth on that server and the images are sucking it up.

We have another server with a lot more free bandwidth.

Is there any way to maps /images/ to goto the other server where we'll upload that folder? This would save us from needing to change the paths of every image across all the pages.

+4  A: 

RewriteEngine On
RewriteRule ^images/(.*) http://your.images.storage.site/images/$1 [L,QSA,R=302]

It requires Apache to have mod_rewrite installed.

Havenard
does \1 work same as $1 ?
ilya.devyatovsky
Nop, just edited it. I'm used to PHP regexps...
Havenard
+1  A: 

try this:

RewriteEngine on
RewriteRule ^images/(.*)$ http://otherwebsite.com/images/$1 [L,R=302]
Mohammad