Redirect domain to index page which is not in root.

Discussion in 'Site & Server Administration' started by mudanoman, Jan 23, 2006.

  1. #1
    mudanoman, Jan 23, 2006 IP
  2. mudanoman

    mudanoman Guest

    Messages:
    596
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am going to try using index.html with:

    <script language="JavaScript">
    self.location.href='/wp/index.php'
    </script>

    Will this "anger" search engines?

    -I
     
    mudanoman, Jan 23, 2006 IP
  3. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's not search engine friendly.

    You can do a 301 redirect to get there, I don't know of any other SEF way. And that javascript certainly isn't search engine friendly.
     
    mdvaldosta, Jan 23, 2006 IP
  4. mudanoman

    mudanoman Guest

    Messages:
    596
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You're right. I played around with the htaccess file and added this instead:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www\.)?dptips\.com
    RewriteRule ^(.*)$ http://www.dptips.com/wp/$1 [R=permanent,L]

    Is this way better?

    Thanks
    -I
     
    mudanoman, Feb 4, 2006 IP