Results 1 to 3 of 3

Thread: ? Redirection

  1. #1
    Join Date
    Nov 2007
    Posts
    5
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question ? Redirection

    Hi, i have been wondering how to do this for sometime now, i have searched on google and found nothing. What i would like to do is redirect users to a specified url after the url of the page, e.g:

    http://mysite.com/mypage.htm?redirectpage.htm

    so, after visiting mypage.htm, it would redirect them to redirectpage.htm, i have seen this done before, like on this site, when you log on, it redirects you back to the last page you viewed. I would be grateful for your help.

    SCOTT CAMPBELL

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Code:
    <meta http-equiv="refresh" content="10;url=http://website.com/path/to/new/page.com">
    10 is the number of seconds to wait before refreshing, and url= the new page you want loaded.

    put this in the <head> section of the page they go to first.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Or, if you want to be able to enter the address in the url or whatnot, you can use php for this:

    redirect.php
    Code:
    <?php
       header('Location: '.$_GET['redir']);
    ?>
    And it works like so:

    Code:
    http://domain.com/redirect.php?redir=http://redirect-site.com
    
    or
    
    http://domain.com/redirect.php?redir=page.html
    Hope this helps.
    Last edited by jscheuer1; 11-17-2007 at 06:55 PM. Reason: spelling/disable url parse
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

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
  •