Submit Your Article Forum Rules

Results 1 to 2 of 2

Thread: New Server and URL

  1. #1
    Junior Member
    Join Date
    Dec 2003
    Posts
    14

    New Server and URL

    I have moved my site to a new server with a new url. Can any one help me with the code so that when a visitor arrives at my old site they are automatically redirected to my new site? Thank you.
    Jim

  2. #2
    Best is using 301 redirect permanently. How is it done depends on the server configuration. Sometime you can use php:
    <?php
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: http://www.site.com");
    header("Connection: close");
    ?>


    Second best is using the META refresh tag
    <meta http-equiv="refresh" content="10;url=http://www.site.com/">

    Leave this 10 secs time to prevent troubles with SE.

    javascript is not a good solution:
    <script>
    window.location.replace("http://www.site.com");
    </script>

Similar Threads

  1. backup local server to web server - recommend service or software?
    By Katt in forum Web Programming Discussion Forum
    Replies: 5
    Last Post: 11-09-2009, 02:26 PM
  2. Image hosting - Same server or different server?
    By AjiNIMC in forum Search Engine Optimization Forum
    Replies: 9
    Last Post: 05-18-2007, 05:45 AM
  3. Power up your Server; world's first vegetable powered server
    By TrafficProducer in forum The Castle Breakroom (General: Any Topic)
    Replies: 3
    Last Post: 12-21-2005, 03:58 PM
  4. Looking to Share Dedicated Server - MS SQL Server 2000
    By supernatural_247 in forum IT Discussion Forum
    Replies: 3
    Last Post: 04-22-2005, 02:03 PM
  5. Windows Server - E-Mail Server
    By gofer01 in forum IT Discussion Forum
    Replies: 0
    Last Post: 01-08-2004, 10:36 AM

Posting Permissions

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