Redirecting A Domain Name To My Website

Discussion in 'Programming' started by djromanof, Mar 9, 2010.

  1. #1
    Hello everyone, I have purchased a domain name for some different extensions and I would like to redirect all of them to the .com one. Could someone let me know how I could do this?

    For example, what I want is to do it in such a way so that when someone tries to access mydomain.net he will be redirected immediately to mydomain.com

    Any information would be really helpful

    Thanks
     
    djromanof, Mar 9, 2010 IP
  2. ceo.ahlul

    ceo.ahlul Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you use cpanel, you can add mydomain.net as addon, an set redirect for mydomain.net to mydomain.com
    Or you can use .htaccess:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://mydomain.com/$1 [R=301,L]
     
    ceo.ahlul, Mar 9, 2010 IP
  3. RixMaze

    RixMaze Member

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    Its a good info it ll be useful for me
     
    RixMaze, Mar 9, 2010 IP