Re: rewrite question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Apr 6, 2009, at 14:32, Gary Smith wrote:

We have a web site that is being pounded pretty hard.  The web site has lots of graphics and our bandwidth is being killed.  We have a dedicated server at another location where we get more bandwidth cheaper (but the overall processing sucks so it can't push the full site).

We would like to rewrite all gif/png/jpegs for www.domain.com and domain.com to go to images.domain.com.  Basically we have rsynced the content to the second domain and until we can tweak the thousands of HTML pages we want to just redirect.

Anyway have a working rule handy for doing this.  I know we will still take a bandwidth hit but like I said, this is just a work around for now.


Assuming you have sensible URIs, you can:

ProxyPass /images http://images.domain.com/images

If not, then you can:

RewriteEngine On
RewriteRule (.*\.(jpg|png|gif))$ http://images.domain.com$1 [R,NC]



--
A stupid man's report of what a clever man says can never be accurate, because he unconsciously translates what he hears into something he can understand.
    Bertrand Russell


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux