Hoe to forward domain using .htaccess modification

Discussion in 'Site & Server Administration' started by sruthin, Sep 5, 2009.

  1. #1
    Hello

    Please help me to forward my entire domain to another domain using .htaccess modification

    This is my .htaccess

    Thank you
     
    sruthin, Sep 5, 2009 IP
  2. youssef93

    youssef93 Well-Known Member

    Messages:
    82
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    123
    #2
    youssef93, Sep 5, 2009 IP
  3. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Use this:

     redirect 301 / http://www.newsite.com/
    Code (markup):
    Remove everyting else in the file. It will correctly forward from old.com/test.txt to new.com/test.txt and so on.
     
    premiumscripts, Sep 5, 2009 IP
  4. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #4
    or u can use mod reqrite

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(.*)oldhost.com [NC]
    RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]
     
    Bohra, Sep 5, 2009 IP
  5. sruthin

    sruthin Peon

    Messages:
    130
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thank you very much
     
    sruthin, Sep 5, 2009 IP