Fast online redirecting with PHP.
<?php //example redirect('http://www.sourcerally.net'); function redirect($location)
{
header('location: '.html_entity_decode($location));
exit;
} ?>
Sign up to add your own comment here!
Comments
|
Gonzo: Your solution is not easier from my perspective. And it is much slower, as it will force the user to make another request to get to the desired url. |
|
This will be much easier ;)
<meta http-equiv="refresh" content="0; URL=http://www.sourcerally.net"> |
|
Note: I only use this function and added it here because I got tired of allways writing two lines when it just should be one. |
|
Google prefers you to send a 301 moved permanently header :/
By default when you send the location header a 302 redirect is sent as well (http://www.php.net/header).
Read about redirect here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html |
|
How does google like pages getting redirected this way? Is the fact that this redirection is taking place visible to SE's or surfers? |
More comments: 1
|
|