• Login
  • Register

DNN Forums

A community discussion page. We're starting from scratch, so...let's get the party started!

Redirects Acting as Rewrites

You are not authorized to post a reply.
Sort:


New Member


Posts:2
New Member

    Hello Community,

    I am trying to solve a mystery with our redirects created under Page Settings >> Advanced >> SEO.  We have a large university site and hence use vanity URLs quite a bit.  We set them up as 301 redirects but in many cases these vanity urls mysteriously rewrite instead - even though they are set up in Page Settings exactly the same. 

    Here are a couple examples:

    • www.cui.edu/advent - rewrites
    • www.cui.edu/reformation500 - rewrites
    • www.cui.edu/finaid - rewrites
    • www.cui.edu//tsymblf - redirects properly
    • www.cui.edu/op - redirects properly
    • www.cui.edu/coaching - redirects properly

    Here's what I have checked so far:

    • I've tried to analyze but found no logical patten that explains the differences  .
    • I've unified our TabUrls table usage through database SQL updates - so every vanity URL uses the same PortalAliasId, PortalAliasUsage, and CultureCode.
    • I've validated that there are no relevant differences in the Tabs table.
    • I've checked response headers using tools like https://websniffer.cc/
    • I've done a server Clear Cache and Restart Application multiple times.
    • I've checked the Admin Log - nothing there.
    • I've checked the URL Management - Expressions setting.  They seem correct.
    • I've rebuilt the site on a separate staging instance and turned off localization.

    Also, I can't find any documentation on Page Settings >> Advanced >> SEO. 

    We appreciate any help.

    Kind regards,
    Mark

     



    Advanced Member


    Posts:126
    Advanced Member

      I'm not sure if I understand you question correctly but normally the these SEO settings are used to generate a 301 to the exiting page. So the issue you have is that some don't generate a 301?
      BTW, if you would be unable to solve this, we have a module you place on the 404 page to do the same.
      (seo redirect link in my footer)


      New Member


      Posts:2
      New Member

        Thanks for responding Timo.  It's good to know your redirect module exists.  I do use your Sytlehelper module. 1000 thank you's for that cool tool.  It saved me on several ocassions.  If you're ever in Oregon I will buy you a very large beer.

        And yes many of the 301 redirects were not sending 301s.  They were sending 200 OK.  For example I set up a vanity URL /reformation500 to 301 to www.cui.edu/aboutcui/reformation500 but instead it sent a 200, showed the page at www.cui.edu/aboutcui/reformation500, and kept the URL as www.cui.edu/reformation500.  Basically it was acting as a Rewrite.

        It took me a long time to figure this out but I solved it a few minutes ago.  As it turns out there is a hidden setting in TabSettings named "DoNotRedirect".  When that Setting has a Value of "True" any 301 set up on page settings does not 301 but rather acts as a Rewrite and sends a 200.  Crazy.  

        I have no idea how this setting got set to "True".  I've looked all over Page Settings and there is nothing in the UI that I can find. So I did a db update, cleared cache, and voila - now we get proper 301s.

        For those who come after me here are the steps to fix this issue:

        Run the SQL update below (use at your own risk):

        UPDATE [TabSettings]
        SET [SettingValue] = 'False'
        WHERE ([SettingName] = 'DoNotRedirect')

        Clear the DNN cache under the gear icon >> Server >> Clear Cache

        Clear your browser cache

        Test and use a tool like https://websniffer.cc/ to verify that your URL is sending a 301 properly.

        - Mark out

         

        You are not authorized to post a reply.

        These Forums are dedicated to discussion of DNN Platform.

        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.

        Would you like to help us?

        Awesome! Simply post in the forums using the link below and we'll get you started.

        Get Involved