Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    denis Guest

    Question Forwarding to another page/website. How?

    Simple methods:

    The PHP method forwards the request at the side of the server
    and is fairly seamless to the viewer. Put this in a file and call it
    <i>index.php</i> then upload to www.domain.com/folder/:

    Code:
    <?php
    header("Location:http://www.domain.com/newfolder/");
    ?>

    The same effect can also be acheived by using a html meta refresh
    which loads the page in the browser then refreshes it and
    forwards it to the new location after a specified amount of
    time. In this case we'll set it at zero seconds so the user does not
    get a large delay. Put this in a file called index.html and upload
    to www.domain.com/folder/:

    Code:
    <html>
    <head>
    <title>redirecting...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="refresh" content="0;URL=http://www.domain.com/new-folder/">
    </head>
    
    <body bgcolor="#FFFFFF" text="#000000">
    
    </body>
    </html>

    In the above examples replace domain.com with the domain in
    question and you can alter the URL's to suit your needs.
    Last edited by denis; 09-08-2004 at 03:18 PM.

  2. #2
    whcdavid is offline WHC Administrator
    Join Date
    Dec 2003
    Posts
    3,539
    DataCenterTalk Rate, review and Discuss about datacenters.
    DatacenterSearch Where your datacenter search ends.

  3. #3
    denis Guest
    Yes, that's right. We use this script for our forums too.

  4. #4
    Pixelation is offline Guru Wanna Be
    Join Date
    Mar 2004
    Posts
    836
    You can use htaccess to do the same thing. I think cPanel uses htaccess to setup redirects.
    For reliable shared and reseller hosting, visit RadixHosting.

  5. #5
    mrhaha Guest
    ok.. thaknsss

  6. #6
    denis Guest
    Quote Originally Posted by Pixelation
    You can use htaccess to do the same thing. I think cPanel uses htaccess to setup redirects.
    Yes, that's true! This is also a Search Engine Friendly method for
    webpage redirection:

    Create a .htaccess file (if does not exists) in your root directory.
    Redirect permanent / http://www.new-url.com

    I use this method very often.

  7. #7
    JeffEDH Guest
    Yes, I love doing redirects using .htaccess, guess its just what you're comfortable with!

  8. #8
    kooshin.com is offline WHC Guru
    Join Date
    Oct 2004
    Location
    http://kooshin.com
    Posts
    4,201
    I think it is a lot better to do it with cpanel .The php method is cool too
    For Reliable and Affordable Web Hosting Packages, Please visit kooshin.com
    KooshinDesigns.com- Version One Online

    ArticleStorage.com- Your #1 Resource For Articles
    4Ulyrics.com -- The Lyrical Hideout, For Sale - Email me for details.

  9. #9
    JeffEDH Guest
    Yes you are probably right about cpanel. Coding in PHP is always cool, I love its redirects as well!

  10. #10
    denis Guest
    Quote Originally Posted by kooshin.com
    I think it is a lot better to do it with cpanel .The php method is cool too
    There is no difference.
    cPanel uses the same method:
    Redirect permanent / http://www.new-url.com
    You just create this field via cPanel.

Page 1 of 3 123 LastLast

Posting Permissions

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