system
November 16, 2012, 3:07pm
1
Hello! Here’s what I need to do…
url visited = http://anything.co.uk or http://www.anything.co.uk
i need to redirect the visitor to .com using:
header (‘Location: http://anything.com/ ’) - this is used in a php page template.
How can i do this with out knowing what ‘anything’ is?
Some thing to do with using $_SERVER I think.
richei
November 16, 2012, 3:31pm
2
2 choices, either register the domain as a .com or use mod rewrite to fake it.
runman
November 16, 2012, 3:39pm
3
not sure if this is what you are looking for, but I do this on single files.
[php]
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.example.com"; );
?>
[/php]
richei
November 16, 2012, 3:48pm
4
The domain has to physically exist for that work, in this case i don’t think it does. In this instance, he’d probably have to use mod rewrite to change the url.