Redirect root directory to a subdirectory using .htaccess

By | August 23, 2010

Every so often I need to redirect from the root directory to The first thing I try is always something like:

# This does not work
RedirectMatch permanent / /blah

This ends up not working with Firefox reporting “the page isn’t redirecting properly”. I guess the server gets confused and redirects indefinitely so you must do this instead:

# Redirect from / to /blah
RedirectMatch permanent ^/$


Leave a Reply

Your email address will not be published. Required fields are marked *