Reputation: 55
Any ideas why this isn't working?
RedirectMatch rule in an .htaccess file.
RedirectMatch "(?:example.com)\/(?:images)\/(.*)(jp?g|bmp|png)" "http://www.example.com/assets/images/public/$1$2"
I've a feeling it boils down to the regex not being correct.
Desired outcome: Basically if a request is made for: http://www.example.com/images/some-logo.jpg it get's pulled from here: http://www.example.com/assets/images/public/some-logo.jpg
Upvotes: 0
Views: 117
Reputation: 48711
I think you are in need of a RewriteRule
rather than RedirectMatch
:
RewriteRule ^images/([^/]+)$ /assets/images/public/$1 [L]
Upvotes: 1