Page is a not externally linkable
- Marketing and Biz Dev
-- Cloaking
---- .htaccess vs in page header redirection


steveonz - 9:44 am on Jul 22, 2010 (gmt 0)


Hey,

I am working on a geo redirection script and want to redirect cusomters to a new directory. What is best, htaccess or in page header redirect?

This is the code I plan to use:

if ($countrySHORT == "NZ")
{
Header("Location: testnz/index.html");
} else {
// Otherwise, redirect them to US site
Header("Location: testus/index.html");
}


I want to be able to place that code in an include and have it on a number of pages but I don't want to edit the pages individuality with the new url, I just want to do a folder redirect.

For example all people from NZ are sent to the NZ/ dir but
Lets say the page is index.html or simon.html it will redirect it to the nz/index.html or nz/simon.html version.

I'm not a fan of telling each page what the new page is. Is this possible?


Thread source:: http://www.webmasterworld.com/cloaking/4174593.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com