htaccess redirect without user knowing
Posted
by
Khuram
on Stack Overflow
See other posts from Stack Overflow
or by Khuram
Published on 2012-03-30T17:21:46Z
Indexed on
2012/03/30
17:29 UTC
Read the original article
Hit count: 232
We are running multiple domains through the same code and we want to save their images in their respective folders. Here's what we are doing.
/images/www.domain1.com/logo.jpg /images/www.domain2.com/logo.jpg
now, what I want to know is, is this possible in htaccess that we rewrite the urls without user suspecting anything. This is what I want that
<img src="/images/logo.jpg" />
should internally become through htaccess
RewriteRule ^images/(.*)$ /images/{HTTP_HOST}/$1 [L,R=301]
But my question is,
- The above redirect continually loops
- Can I achieve the img effect without user or admin suspecting anything?
Sincerely,
Khuram
© Stack Overflow or respective owner