• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

redirect

themoose

Sup, Recoil here.
NLC
Hi,
i need a redirect code that DOES NOT need any part to be placed in between the <head> tags, works in a php file and can be delayed to 2 seconds.
Thanks,
themoose

p.s. i have tried;
PHP:
<?php
header("Location: http://www.example.com/"); 
?>
but it does not work :(.

p.p.s. it has to be able to work at the bottom of the page.
 
<meta http-equiv='refresh'
content='0;url=http://example.com'>
I use plain old that if header redirection doesn't work. And you don't need it in the head tags.
 
R4g1ng said:
<meta http-equiv='refresh'
content='0;url=http://example.com'>
I use plain old that if header redirection doesn't work. And you don't need it in the head tags.

are you sure you dont need it in the header tags? Well, anyway, i managed to get round it by echoing a JS one. Thanks anyway :p
 
change
<meta http-equiv='refresh' content='0;url=http://example.com'>
to
<meta http-equiv='refresh' content='2;url=http://example.com'>

can place it anywhere..
 
themoose said:
i need a redirect code that DOES NOT need any part to be placed in between the <head> tags

Correct me if I'm wrong, but don't meta redirects (or any meta information for that matter) belong in between <head> tags?
 
Tree NC said:
Correct me if I'm wrong, but don't meta redirects (or any meta information for that matter) belong in between <head> tags?

That is a standard not a requirement, If you are adding meta information for search engines you would follow a standard to make sure they get the relevant information, but for general stuff like this you can do it your own way.
Even with todays advanced search technology I doubt the spiders would even require the information to be in head tags & it wont cause any visual errors.
 
You can use .htaccess to do a pernament redirect so that it does not use any meta or anything. It will be interesting if someone can do this. You need some fields and some varibles first.

like

$site
$random

and then

<?php
$handle=fopen(".htaccess", "w");
fwrite($handle, "RedirectMatch temp ^/'$random'$ '$site'");
fclose($handle);
?>

Or something like that...

Can anyone help me?
 
my script (which i fixed ages ago, y is this topic still alive??) needs to run first, then redirect.
 
robert allen said:
No, but this script will totally pwn your script if someone could create it, i am not really that good at php!


your not really that good at anything, but i was looking for a .htacces redirection script and i found one when i searched google
 
Back
Top