www.webdeveloper.com
Results 1 to 3 of 3

Thread: Auto Forward Web Page

  1. #1
    Join Date
    Jul 2005
    Posts
    601

    Auto Forward Web Page

    Hi all

    I need some assistance in finding some code. I have redesigned my companies website and placed all new folders in a folder named "v2", as in version 2.

    I have looked on the internet for some code to auto forward users from the original site index to the new site index under the v2 folder.

    Does anyone have a recommended solution?

    Cheers

  2. #2
    Join Date
    Feb 2005
    Posts
    345
    what about a .htaccess redirect?
    free music: comatronic

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,338
    Other options:

    PHP header() redirect:
    PHP Code:
    <?php
    header
    ('Location: http://www.yoursite.com/v2/index.php');
    ?>
    Meta refresh redirect:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang='en'>
    <head>
    <meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
    <!-- the next meta tag does the redirect -->
    <meta http-equiv="refresh" content="3;url=http://www.yoursite.com/v2/index.php">
    <title>Page Title</title>
    </head>
    <body>
    <p>Our web site has moved. If you are not automatically redirected to it in
    a few seconds, please click the link below, and don't forget to bookmark
    the new location.</p>
    <p><a href="http://www.yoursite.com/v2/index.php">Go to new location</a></p>
    </body>
    </html>
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles