Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...301 Redirect non www to www301 Redirect non www to www
Previous
 
Next
New Post
2/22/2012 2:32 AM
 

Hello, I would like to ask a seemingly simple question since this is something that can be done really easily in php, using the htaccess. Is there a way that I can perforf a 301 redirect from the non-www version of the site to the www? Perhaps using the SiteUrls.config??? I am currently using the DNN 5.6.3.

Thanks in advance!

 
New Post
2/23/2012 3:14 AM
 
Hi Andreas,

The DNN default url rewriter can not supports 301 redirection feature. We have implemented a custom URL Rewriter in DNN to implement your feature(http://www.novasoftware.com/Case_Stud...), which allow user to define the rules for 301 redirection.
I think we can help you.

Developer in NovaSoftware, a professional oursoursing company in China(http://www.novasoftware.com/Developer/DotNetNuke.aspx). Majoring in DotNetNuke techniquche, such as custom modules development, skin implementation & DNN web site solution.
 
New Post
2/23/2012 9:09 AM
 

Do you have a module for that? Because your link sends to a case study. I also have to tell you that URL Master performs all kinds of 301 redirects very easily but there is no reason for one to buy the entire module just because he wants to redirect the non-www to www.

 
New Post
2/23/2012 10:22 AM
 

You can use URLRewrite  module installed with IIS 7 for your site:

Here is the code part in your webconfig you can write directly to the file

...

<rewrite>
<rules>
<rule name="301 redirect from non-www to www">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^www\.mydomain\.com$" negate="true" />
</conditions>
<action type="Redirect" url="http://www.mydomain.com/{R:1}" />
</rule>
</rules>
</rewrite>

</system.webServer>

 

 
New Post
2/23/2012 10:26 AM
 
If you have access to your server (dedicated or co-located hosting) you can do this using IIS. The short version is you create an application on IIS 7 for the non-www site (both domains can point to the same IP address) then you setup an HTTP Redirect from the non-www that points to the www.

This way IIS redirects any non www requests to your main site.

Personally, I use URLMaster for this since it also handles all of my urls and other handy 301 features.


Steven Webster
Manager, Community Platform
F5 Networks, DevCentral
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...301 Redirect non www to www301 Redirect non www to www


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out