What I’d like to do is have requests for a given extension fowarded to a script with a query string.
Example…
Requests for: http://mySite.com/myImage.png
Will be redirected to: http://mySite.com/imageServer.php?image=myImage.png
Thanks for you help on this one, I’m no good at mod_rewrite or even regular expressions, much appreciated.
This rule will rewrite (internal redirect) all requests for ANY .png file to
/imageServer.php?image=<file-name.png>.If you need this to be the actual redirect (301 Permanent redirect, when URL changes in browser), then add
R=301to the rewrite rule flags, e.g.[NC,L,R=301].