Log in

View Full Version : ? Redirection



scottjcampbell
11-17-2007, 11:37 AM
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

BLiZZaRD
11-17-2007, 05:09 PM
<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.

thetestingsite
11-17-2007, 05:19 PM
Or, if you want to be able to enter the address in the url or whatnot, you can use php for this:

redirect.php


<?php
header('Location: '.$_GET['redir']);
?>


And it works like so:



http://domain.com/redirect.php?redir=http://redirect-site.com

or

http://domain.com/redirect.php?redir=page.html


Hope this helps.