Redirect, index.php

Hi -

I would like to set up my Dreamhost website to redirect to a different site IF the user points to the root of the website, but allow users to browse subdirectories. It looks like the panel redirect does not allow that. I tried setting up an index.php like this:

<?php header('Location:') ?>

and that doesn’t work. Any suggestions?

Thanks for your help.


You can also use an .htaccess file with this:

RedirectMatch ^/$

But you might want to login to shell /w SSH and use nano to make the file if you are using Windows (CRLF linebreaks will cause it not to work)