In most cases there is a big problem to determine which url is the main url of web-site when urls are written in www-form and in non www-form (for example "http://www.elisy.net" and "http://elisy.net"). For search engines these urls are links to different web-sites.

The attached module redirects "http://elisy.net" requests to "http://www.elisy.net". Using this template you can rewrite module for your urls. Please, note that "Default.aspx" should be deleted also from "http:// elisy.net/Default.aspx" in SE optimized web-sites. Thus "http://elisy.net", "http://elisy.net/Default.aspx" will be redirected to "http://www.elisy.net" with "301 Moved Permanently" code. Method does not include redirection of "http://www.elisy.net/Default.aspx" to "http://www.elisy.net".

Please do not forget to connect module in the Web.Config using the similar code:

<httpModules> <add name="WwwAddingModule" type="Elisy.Theater.Web.HttpModules.WwwAddingModule"/> </httpModules>

WwwAddingModule.cs (1.48 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5