MB34
MB34

Reputation: 4404

URL rewrite image links

I have third party sites that link to some images on my site. The images were placed in Magento's image cache some time ago. But when the cache is refreshed, Magento modifies the file names and thus the links become unreachable. It is not every image just certain ones that this is happening to. I have 22 images where I need to do this.

How can I modify my .htaccess to make the links go to a static copy of the image located in another directory?

Upvotes: 0

Views: 175

Answers (1)

Jon Lin
Jon Lin

Reputation: 143886

Take a look at mod_alias and RedirectMatch, you can use regular expressions to match against a URI and a target (where to redirect to), if you don't need regular expressions, you can just use Redirect.

RedirectMatch /old_image_uri /new_image_uri

Upvotes: 1

Related Questions