View Full Version : redirect of root in .htaccess

04-20-2010, 04:24 AM
This is sort of complex. Basically there's two sites running off the same database. There's polarisrising.com, which is the "main site", and stepintotheflow.com, which is the Blog. On the linux box hosting it there's soft linking of directories so that the sites have different .htaccess files and config files but share the same code.

The goal is that for stepintotheflow.com, it redirects the root to stepintotheflow.com/Blog and leaves the other URLs alone.

In .htaccess I have:

RedirectMatch permanent ^/$ http://www.stepintotheflow.com/Blog

which works - except it redirects it to www.polarisrising.com/Blog for some reason. I want it to keep the same site name. I have no idea why it does this as there's nothing in .htaccess with polarisrising in it. Just going to http://www.stepintotheflow.com/Blog works fine without the redirect to the other name.

I've also tried various RedirectCond/RedirectRule and nothing works.

Thanks for any help!

04-23-2010, 01:32 PM

RewriteEngine on
RewriteCond %{HTTP_HOST} stepintotheflow.com$ [NC]
RewriteRule (.*) http://www.stepintotheflow.com/Blog [R=301,L]