tags:

views:

22

answers:

1

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???

+1  A: 

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.

Ignacio Vazquez-Abrams
I ended up figuring out the ultimate solution! MOD_ALIAS allows you to setup a server side redirect so the client never actually sees the target domain it's fetching the images from. http://httpd.apache.org/docs/2.0/mod/mod_alias.htmlIt was real simple, from SSH:1. locate httpd.conf (find your active httpd.conf)2. vi httpd.conf3. scroll down to your virtual domain and add the following code:AliasMatch ^/images(.*) /usr/local/htdocs/yoursite/images/$1 or whatever the real path isTook me a while to find this solution, Even my hosting company couldn't help me with this one.