header

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.

2 choices, either register the domain as a .com or use mod rewrite to fake it.

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]

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.

Sponsor our Newsletter | Privacy Policy | Terms of Service