September 11, 2010
@ 09:38 PM
adres çubuğunda www yazılıp yazılmadığını kontrol edin. yoksa www ekleyin.

if (Request.Url.Authority.StartsWith("www"))
return;


var url = string.Format("{0}://www.{1}{2}",
Request.Url.Scheme,

Request.Url.Authority,

Request.Url.PathAndQuery);


Response.Redirect(url, true);


 
Categories: ASP.NET | C# | Web