I have a temporary need to redirect some installer files on my web site. The redirects that are working now look something like this:
Redirect 302 /installer_1.0.0.zip http://www.example.com/download/installer_1.0.3.zip
Redirect 302 /installer_1.0.1.zip http://www.example.com/download/installer_1.0.3.zip
Redirect 302 /installer_1.0.2.zip http://www.example.com/download/installer_1.0.3.zip
I would like to use a regex instead of having multiple lines for each version I need to redirect. I have tried these options with no success:
Redirect 302 /installer_(.*).zip http://www.example.com/download/installer_1.0.3.zip
Redirect 302 /installer_([0-9+]\.[0-9+]\.[0-9+]).zip http://www.example.com/download/installer_1.0.3.zip
EDIT
I've tried what Joni Salmi has recommended and cannot get it to work. I've tried several iterations of similar rules I've encountered on the web, all to no avail. I feel like I'm missing a fundamental concept here. My .htaccess
file on the root of this site has several rules and redirects and they all seem to work just fine. But none is like this, where I have a regex in the middle of an URL string.
Hopefully I can get some more answers from those who have d one this kind of thing in their own projects.