1

How to redirect cache product image to default product image ? Is it possible via .htaccess file

Redirect  [BASE_URL]/media/catalog/product/m/o/art.jpg  [BASE_URL]/media/catalog/product/cache/1/image/9df78eab78452d08d6e5fb8d27136e95/m/o/art.jpg
2

Please try with below code:

RewriteEngine On

RewriteRule "^/media/catalog/product/m/o/art.jpg" [BASE_URL]/media/catalog/product/cache/1/image/9df78eab78452d08d6e5fb8d27136e95/m/o/art.jpg [L,NC,NE,R=302]
  • Working fine....and what if that file does not exist ? can i overwrite 404 rule ? – Pranav Patel Sep 6 at 10:22
  • if file not exist than its return 404 – Anas Mansuri Sep 6 at 10:58

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.