Redirecting multiple files with htacces

Hi all -

Here’s the situation:

I just overhauled a site for my company, and in so doing renamed many of their pages from “casepage.htm” to “index.htm”.

These “casepage.htm” files were all located in a separate directory, and their path to the root looked like this:


So the new paths look like this:


What I want to do is set a rule in my htaccess file that says “for all pages that used to be named casepage.htm, the new file is called index.htm and is found in the directory where casepage.htm used to be located.”

I could set up individual redirects that look like this:

Redirect permanent /cases/some_case/casepage.htm /cases/some_case/index.htm

But I’ve got more than 150 individual directories that fit this scenario, and it just seems like there has to be a way to do this with a single htaccess command.

Any ideas?

Thanks in advance for your help!


Uhm. Why not rename the files to index.htm? Or make it call the casepage.htm? Otherwise, look up using “ln” creating links.

Here is an example with Mambo:

Save [color=#CC0000]$97[/color] on Dreamhost plans by using promo code: [color=#CC0000]SRVR97[/color]

I’m not sure but you can try RedirectMatch

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].