[thelist] Apache mod_rewrite

Mark Gillingham markgill at uwalumni.com
Wed Nov 21 13:11:21 CST 2001


A site structure was altered in two ways: a subdirectory was moved and 
the extension changed from "html" to "shtml." I'm trying to pick up 
pages that have both problems. I am able to pick up each problem 
separately with other rules.

The rule that I thought would work follows:

RewriteRule junior/(.+)\.html$           programs/junior/$1\.shtml  [L]

The directory "junior" is now at "programs/junior". If one points to an 
old bookmark (e.g., /junior/about/stuff.html) I want to grab the stuff 
after "junior/" and before ".html" and replace it what surrounds it, 
both before (with programs/junior/" and after (with .shtml). Any advice?

Mark





More information about the thelist mailing list