Comments

  1. Ron says:

    Unfortunately the file in DNN 5.1.0 looks like this:

    If Host.UseFriendlyUrls Then
    hypLogo.NavigateUrl = FriendlyUrl(Nothing, “~/”, PortalSettings)
    Else
    hypLogo.NavigateUrl = “~/”
    End If

    • George says:

      Yes, thank you for pointing this out.

      With this enhancement, it will not generate the extra ‘default.aspx’ at the end.

      However, “FriendlyUrl(Nothing, “~/”, PortalSettings)” are not working so well with other friendly url modules currently.
      Hope this will be fixed in future.

      If you’re using ifinity module to rewrite the url, you may still change the = FriendlyUrl(Nothing, “~/”, PortalSettings) to GetPortalDomainName(PortalSettings.PortalAlias.HTTPAlias, Request) & “/”
      to temporary fix the problem.

  2. Laxmi says:

    Thanks for these great information. My site has also a canonical Issue i want to redirect http://alert-ims.com to http://www.alert-ims.com. Is its possible in dotnetnuke without using IIS Server redirection.

    I also place the 301 ASP redirection code in my default page through put its not work code is given below please check is its correct or not-:

    or

    Please mail me if its possible through dotnetnuke.

    Regards
    Laxmi Narayan

  3. David says:

    Sorry this doesn’t seem to be working for me. I don’t understand the exact code I am supposed to replace.
    Should this code:

    ‘ use site root
    If Host.UseFriendlyUrls Then
    hypLogo.NavigateUrl = FriendlyUrl(Nothing, “~/”, PortalSettings)
    Else
    hypLogo.NavigateUrl = “~/”
    End If

    Be replaced with this:
    ‘ use site root
    If Host.UseFriendlyUrls Then
    GetPortalDomainName(PortalSettings.PortalAlias.HTTPAlias, Request) & “/”
    Else
    hypLogo.NavigateUrl = “~/”
    End If

    Thanks

    • George says:

      It should be like this:

      If Host.UseFriendlyUrls Then
      hypLogo.NavigateUrl = GetPortalDomainName(PortalSettings.PortalAlias.HTTPAlias, Request) & “/”
      Else
      hypLogo.NavigateUrl = “~/”
      End If

  4. David says:

    This doesn’t seem to be working for me.
    I get a a runtime error:
    Server Error in ‘/’ Application.

    Any ideas how to get this to work with DNN v5.1.4 – I have the following code:
    If PortalSettings.HomeTabId -1 Then
    ‘ use portal home page specified
    hypLogo.NavigateUrl = NavigateURL(PortalSettings.HomeTabId)
    Else
    ‘ use site root
    If Host.UseFriendlyUrls Then
    hypLogo.NavigateUrl = GetPortalDomainName(PortalSettings.PortalAlias.HTTPAlias, Request) & “/”
    Else
    hypLogo.NavigateUrl = “~/”
    End If
    End If

    Thanks

    • George says:

      I’ve tested it code and it works fine.

      1. If you have no DNN FriendlyUrl enable, you need to change line 77 instead of 81.

      2. Please do not copy directly from the comment as WordPress editor automatically covert the double quote ” ” and the &. (Don’t use curly quote)

  5. David says:

    I managed to add the code and website dsiplays corrrectly. The problem is I am still able to type in: http://www.domain.com/default.aspx and the page appears. Is there any way to fix this?

    thanks

  6. SEO Bristol says:

    Hey, great blog post. Do you only write on here or do you write on other blogs to? Would like to follow your content.

Speak Your Mind

*