Welcome to WebmasterWorld Guest from 174.129.135.89

Forum Moderators: ocean10000

Message Too Old, No Replies

Redirect server side from domain.com to www.domain.com

   
4:50 am on Oct 6, 2005 (gmt 0)

10+ Year Member



Can someone please sticky me the code and process that I will need to follow in order to redirect a clients traffic from domain.com to www.domain.com? I am a pHp person and am not familiar with .Net. Please someone help me out as they are getting hit with problems.

Thank You

1:22 pm on Oct 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could pass the url into something like this and redirect accordingly:

private string TreatURL(string input_RawURL)
{
string internal_RawURL = input_RawURL;

if (internal_RawURL.StartsWith("http://www.") == false )
{
internal_RawURL = "http://www." + internal_RawURL;
}

return internal_RawURL;
}