Forum Moderators: phranque
Suppose that my server folder setting are:
/htdocs/affiliate1.com/html/
/htdocs/affiliate2.com/html/
/htdocs/affiliate3.com/html/
....
/htdocs/myshoppingsite.com/html/images/
Now I store all product image files into the /htdocs/myshoppingsite.com/html/images/ folder.
What I want is that when visitors hit http://www.affiliate1.com/images/abc.jpg, my server can handle it and retrieve the real file abc.jpg from where it stored in, then return a 200 server header code to the browser.
Is it possible?
Anybody can help me out?
Thank you!
Given what you've posted, it should be possible to do what you need to do. The problem can be broken down into two parts: First, you need to unabiguously recognize shared-image requests based on the requested URL, and second, you need to rewrite that URL so that it references your shared image directory.
The first part is accompished by using regular-expressions pattern matching on the requested URL, and the second part is accomplished by the URL-rewriting function of RewriteRule. I have posted some references at the end of our charter [webmasterworld.com] that may be useful to you.
Jim