SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Enthusiast Rockin' Redhead's Avatar
    Join Date
    Jan 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Point Me In The Right Direction

    I have to preface this by saying I've tried searching the forums for this answer, but my browser kept timing out. So, forgive me if someone's covered this recently. I recently purchased two domain names - one will be the site name, the other, I want to point it to the first, so the user/surfer is re-directed to the first. What's the correct code to do that? Since the site is pretty small, I'm doing this the old-fashioned way with HTML/XHTML code and notepad. I appreciate your help! ~ Christine

  2. #2
    SitePoint Enthusiast linkstraffic's Avatar
    Join Date
    Oct 2005
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may do this by redirecting your domain name modifying your dns settings. That will be quicker.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by linkstraffic View Post
    You may do this by redirecting your domain name modifying your dns settings. That will be quicker.
    Agreed, if you don't know how to do this, your hosting or domain name technical support should be able to walk you through it.

  4. #4
    SitePoint Enthusiast Rockin' Redhead's Avatar
    Join Date
    Jan 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the info - I'll give them a call.

  5. #5
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    with some javascript in the head ?

    <head>
    <script language="JavaScript">
    <!--
    window.location="http://www.yourwebsite.com";
    //-->
    </script>
    </head>


    or with php:

    <?php
    header( 'Location: http://www.yoursite.com' ) ;
    ?>

  6. #6
    SitePoint Enthusiast Rockin' Redhead's Avatar
    Join Date
    Jan 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is great - thank you!

  7. #7
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    using htaccess is a fast way to redirect your site, because the server checks for a .htaccess file before displaying the page.
    Code:
    Redirect 301 /oldpage.html http://www.example.com/newpage.html

  8. #8
    SitePoint Enthusiast Rockin' Redhead's Avatar
    Join Date
    Jan 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I've not used htaccess before - is it best used in a single or multi-server environment?

  9. #9
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rockin' Redhead View Post
    Thanks. I've not used htaccess before - is it best used in a single or multi-server environment?
    I'm not very experienced with htaccess files, but they are quite useful and powerful. I'm sure they will work in almost any environment.

  10. #10
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,222
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    htaccess files are used on Apache web servers and can be used in multi-server enviroment.

    They control things like user friendly links and permissions to directories as well as forwarding.

  11. #11
    SitePoint Enthusiast Rockin' Redhead's Avatar
    Join Date
    Jan 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's good information - thank you both!


Bookmarks

Posting Permissions

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