1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect root URL only, no inner pages ??

Discussion in 'Blogging' started by phluid, Sep 25, 2014.

  1. phluid

    phluid Power Member

    Joined:
    Jan 25, 2011
    Messages:
    748
    Likes Received:
    340
    It has to be something simple but I've looked all over and can't figure it out. I need to redirect only the root url of a site without redirecting any of the any pages. Anyone familiar with this? It is a wordpress site and I would prefer to do it via the .htaccess file.
     
  2. cleanguy2

    cleanguy2 Jr. VIP Jr. VIP

    Joined:
    Jan 28, 2013
    Messages:
    128
    Likes Received:
    19
    Why don't you edit your wordpress theme? Go under Appearance and Editor and try editing index.php or front-page.php
     
  3. blacat

    blacat Regular Member

    Joined:
    Dec 8, 2009
    Messages:
    457
    Likes Received:
    147
    Location:
    DownWorld
    Try this code in your .htaccess file

    Code:
    RewriteEngine On
    rewriteCond %{HTTP_HOST} ^CURRENTDOMAIN.com [NC]
    rewriteRule ^(.*) http://www.NEWDOMAIN.com [R=301,L]
    
     
  4. phluid

    phluid Power Member

    Joined:
    Jan 25, 2011
    Messages:
    748
    Likes Received:
    340
    No luck, there be an additional of my .htaccess being all twacked out. I'm starting to wonder if it's even going to be possible the way I have things setup.
     
  5. blacat

    blacat Regular Member

    Joined:
    Dec 8, 2009
    Messages:
    457
    Likes Received:
    147
    Location:
    DownWorld
    Try this simple one
    Code:
    redirect 301 / http://www.TARGET.com
     
  6. phluid

    phluid Power Member

    Joined:
    Jan 25, 2011
    Messages:
    748
    Likes Received:
    340
    I tried that before and it redirect all my inner pages to the root url of the other site as well.