Reputation: 51
I have two websites e.g.,
example1 is already up and has all the images I need to put in my example2 website.
i want to get all images from example1 to put in my example2 website e.g.,
www.example1.com/media/img/image1.jpg <-- get this image and put in www.example1.com/media/img/image2.jpg
I want this done so that I don't have to copy all images from example1 directory to example2
Thank you all... :)
Upvotes: 1
Views: 2463
Reputation: 784958
Enable mod_rewrite and .htacces. Then put this code in your .htaccess under DOCUMENT_ROOT:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
#RewriteCond %{HTTP_HOST} ^(www\.)?example2\.com$ [NC]
RewriteRule ^media/img/ http://www.example1.com%{REQUEST_URI} [L,R=301,NC]
Upvotes: 1