Written by:SuperUser Account
29.11.2010 9:44 
When you are interested in SEO (you should be) your site should be configured to solve problem with serving the same content for different site (from search engines point of view). For example the problem is with the following URLs:
- http://www.mysite.com
- http://mysite.com
- http://www.mysite.com/Default.aspx
- http://www.mysite.com/Home.aspx
For Google and other search engines it looks like four different pages with the same content and the result is page penalization for duplicate content.
If you do not have an access to IIS or your hosting provider do not support ISAPI rewrite for using htaccess the only way for your is using some extra solution applicable directly on site. After long research trough the Google we found one very nice, elegant and effective solution.
301 redirect and URL rewrite using UrlRewritingNet on DotNetNuke
The solution named UrlRewritingNet.UrlRewrite is an Open Source Component for easy and reliable rewriting URLs with ASP.NET. To make it work on your DNN site:
1) Copy UrlRewritingNet.UrlRewriter to /bin folder
2) Add section to configSection area:
</sectionGroup>
<section name="urlrewritingnet" requirePermission ="false"
type="UrlRewritingNet.Configuration.UrlRewriteSection,
UrlRewritingNet.UrlRewriter" />
</configSections>
3) Define own URLs rewrite rules. At example below are rules to mysite.com -> www.mysite.com and www.mysite.com/Home.aspx -> www.mysite.com:
</configSections>
<urlrewritingnet
rewriteOnlyVirtualUrls="true"
contextItemsPrefix="QueryString"
defaultPage = "default.aspx"
defaultProvider="RegEx"
xmlns="http://www.urlrewriting.net/schemas/config/2006/07" >
<rewrites>
<add name="nonWWWtoWWW" virtualUrl="^http\://mysite.com/(.*).aspx"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="http://www.mysite.com/$1.aspx"
redirect="Domain"
redirectMode="Permanent"
ignoreCase="true" />
<add name="Home" virtualUrl="^http\://www.mysite.com/Home.aspx"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="http://www.mysite.com/"
redirect="Domain"
redirectMode="Permanent"
ignoreCase="true" />
</rewrites>
</urlrewritingnet>
<connectionStrings>
4) Add module definition to httpModules area:
<httpModules>
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule,
UrlRewritingNet.UrlRewriter" />
...
</httpModules>
That's all. The dll, documentation, examples and many more you can download from urlrewriting.net page.
2 comment(s) so far...
Re: DotNetNuke search engine friendly URL
I am very glad to know that your site is upgrading from the simplest to more faster and synchronized form. I am quite familiar of a lot of sites since I work as a freelance writer and one of the sites that I find evolve is your site respectively.
By Project management on
6.2.2011 16:13
|
Re: DotNetNuke search engine friendly URL
Do not hesitate to leave a comments or contact us with any query. By runescape gold on
9.9.2011 3:57
|