Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2010
    Thanked 0 Times in 0 Posts

    redirect of root in .htaccess

    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!

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Florida, USA
    Thanked 406 Times in 398 Posts
    RewriteEngine on
    RewriteCond %{HTTP_HOST} stepintotheflow.com$ [NC]
    RewriteRule (.*) http://www.stepintotheflow.com/Blog [R=301,L]


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts