How to redirect www to known www in Asp.net ?

anuingenious

New member
Joined
May 3, 2013
Messages
6
Points
0
I have a commercial website in Asp.net and i have to redirect my website from WWW to known WWW for Seo purpose.Is there any way to do this.
 

webdesign

Well-known member
Joined
Jul 5, 2012
Messages
120
Points
0
I have a commercial website in Asp.net and i have to redirect my website from WWW to known WWW for Seo purpose.Is there any way to do this.
Hello, I found a topic on Webmaster Sun relate to problem you want to ask
http://www.webmastersun.com/threads/2836-301-Redirect-in-htaccess-PHP-and-IIS

Try to use ISS tips in thread above or you can use code

Code:
if (Request.Url.ToString.IndexOf("www") < 0)
{
	Response.redirect("http://www." + Request.Url.ToString.Remove("http://"));
}
Use this code in application_beginrequest event of Global.asax

Good luck!
 
Older Threads
Replies
1
Views
4,189
Replies
7
Views
6,165
Replies
10
Views
11,769
Replies
4
Views
4,466
Newer Threads
Replies
1
Views
3,309
Replies
6
Views
3,778
Replies
1
Views
9,274
Latest Threads
Replies
0
Views
44
Replies
0
Views
49
Replies
1
Views
453
Replies
1
Views
406
Recommended Threads
Replies
25
Views
18,071
Replies
0
Views
2,853
Replies
4
Views
4,760
Similar Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top