I want to change the image path (even stylesheet background image url) with .htaccess, My Magento site gets all images from production site in local server,

  • Why dont you use core functionality System > Configuration > General / Web > Unsecure / Secure > Base Media URL? – Jonathan Ribas Feb 17 '17 at 9:02

Hello I have website1 is http://example1 and another is http://example2 If you want to change path using .htaccess the rule be

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]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.