To use .htaccess rules to redirect
/site/YYYY/ on pages that rely on FrontPage Server Extensions.
/site/.htaccess for redirects to sub-directories:
RedirectMatch ^(/site/?|/site/index\.html)$ /site/YYYY
This rule says that the server should redirect requests for either this directory (
/site/) or this directory’s index file (
Add the additional rules after the part of the .htaccess file that FrontPage has already written to.
This will work for basic pages, but for pages that rely on FrontPage Server Extensions there is an extra step. You need to add:
to each of the .htaccess files in the underscore sub-directories of
/site/, and their sub-directories too, e.g.:
As above, be sure to add the new rule at the end of the file, after the FrontPage-related rules. If you add the redirect rule to the main .htaccess file but don’t add the options rule to these other .htaccess files then people will not be able to log into
/site/ (i.e. open the
/site/ “web”) using FrontPage.
Sites that I’ve set up to work this way are:
- FrontPage and mod_rewrite workaround for time-based rewrites on this site
- FrontPage and the .htaccess file
- Advanced htaccess demo/example using cookies, headers, rewrites (Ask Apache)
- Stupid htaccess tricks (Perishable Press)
- Ultimate htaccess examples (Evolt)