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...Administration ...Administration ...DNS - AliasesDNS - Aliases
Previous
 
Next
New Post
6/27/2010 9:29 AM
 
My site responds to both domain.com and www.domain .com.  To resolve this issue, I assume that all I need to do is remove the domain.com alias?  But before I do this, I wanted some confirmation that I am thinking correctly.  Thanks!

Shaun
 
New Post
6/27/2010 7:24 PM
 
Shaun - removing one won't stop the site from working with the standard DNN Url Rewriter - it makes the assumption for you that your site will work with www and no-www.

You can remove it from the IIS configuration - that will stop it working.

However, the correct response is to redirect the example.com Urls to the www.example.com urls using a 301 redirect.  This will allow your site to work for both, but will force to the www.example.com version.
 
New Post
6/28/2010 11:04 AM
 
Thanks.  Worked Perfectly.  I use powerdnn.com as my hosting provider and I simply had to change a page with some code to get this accomplished.  I am running DNN 5.4 and needed to modify the page /SiteHeader.aspx.  I simply added this code and the redirect now works.  (I believe that this change is host provider specific.)

<script runat="server" language="VB">
    Private Sub CUSTOM_PageLoad_ForceWWW(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim RequestURI = Request.Url
       
        If Not RequestURI.Host.ToLower().StartsWith("www.") Then
            Dim NewURL = RequestURI.Scheme + "://www." + RequestURI.Host + Request.RawUrl
           
            Response.Status = "301 Moved Permanently"
            Response.AddHeader("Location", NewURL)

        End If
    End Sub
</script>
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DNS - AliasesDNS - Aliases


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