My knowledge in HTACCESS is very limited.
Currently I wrote a script that will redirect albums.mysite.com/images/ to www.imageserver.com/images/
Here is the CODE -
But I want that, this redirection will only work if a image-file is included with albums.mysite.com/images/
that is -
it will redirect to www.imageserver.com/images/abc.jpg (or GIF or PNG etc)
if
http://albums.mysite.com/images/abc.jpg
BUT,
it will redirect to -
http://albums.mysite.com/index.php
if called by just -
http://albums.mysite.com/images/
How to do that ?
Currently I wrote a script that will redirect albums.mysite.com/images/ to www.imageserver.com/images/
Here is the CODE -
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^albums.mysite.com$
RewriteRule ^images/?(.*)$ http://www.imageserver.com/images/$1 [R=302,L]
But I want that, this redirection will only work if a image-file is included with albums.mysite.com/images/
that is -
it will redirect to www.imageserver.com/images/abc.jpg (or GIF or PNG etc)
if
http://albums.mysite.com/images/abc.jpg
BUT,
it will redirect to -
http://albums.mysite.com/index.php
if called by just -
http://albums.mysite.com/images/
How to do that ?