-
? 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
-
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.
-
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.