We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46580
    • 167 Posts
    After having redefined alias I note that SEOtab 2.0.4-pl doesn't create 301 redirects properly in another context than "web".

    Redirects works fine but :

    URLs are created with the domain/URL of the default web context, not resource context.

    I found the following setting :
    301 Redirects are unique per context
    and set it to YES
    but redirect stop working.

    Any idea ?

    [ed. note: johnxx last edited this post 6 years, 10 months ago.]
      MODX lover
      -
      Développeur MODX / Webdesign / Solutions web
      • 3749
      • 24,544 Posts
      Do you have the allow_forward_across_contexts System Setting turned on?
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 46580
        • 167 Posts
        Quote from: BobRay at Dec 30, 2017, 07:34 PM
        Do you have the allow_forward_across_contexts System Setting turned on?

        Yes, it is. But it doesn't pair the context with host.
          MODX lover
          -
          Développeur MODX / Webdesign / Solutions web
          • 46580
          • 167 Posts
          Quote from: johnxx at Dec 31, 2017, 05:36 PM
          Quote from: BobRay at Dec 30, 2017, 07:34 PM
          Do you have the allow_forward_across_contexts System Setting turned on?

          Yes, it is. But it doesn't pair the context with host.
          URL keep the default web context host.
          I check again http_host for the context and it is correct and distinct from the web context sIte Host.
            MODX lover
            -
            Développeur MODX / Webdesign / Solutions web
            • 3749
            • 24,544 Posts
            If you're redirecting in a snippet or plugin, try using switchContext().

            If users are logged in, make sure you use the &contexts property in Login to log them in to all contexts.

            If you're using makeUrl(), specify the context in the call (second argument, I think). MakeUrl() will use the current context if you don't specify one.

              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 46580
              • 167 Posts
              Quote from: BobRay at Jan 01, 2018, 12:58 AM
              If you're redirecting in a snippet or plugin, try using switchContext().

              If users are logged in, make sure you use the &contexts property in Login to log them in to all contexts.

              If you're using makeUrl(), specify the context in the call (second argument, I think). MakeUrl() will use the current context if you don't specify one.


              Thank you for your reply.
              I didn't find the source of the problem.
              When I create 301 "manually" by clicking on the "Create a 301 redirect" button, the field is prefilled with the right site URL.

              I'm thinking about an interaction with another plugin (Babel ?).

              I have finally disabled/commented the code generating 301 redirects on alias change in the plugin and set stercseo.context-aware-alias to NO. [ed. note: johnxx last edited this post 6 years, 10 months ago.]
                MODX lover
                -
                Développeur MODX / Webdesign / Solutions web
                • 46580
                • 167 Posts
                Quote from: johnxx at Jan 01, 2018, 01:08 PM
                Quote from: BobRay at Jan 01, 2018, 12:58 AM
                If you're redirecting in a snippet or plugin, try using switchContext().

                If users are logged in, make sure you use the &contexts property in Login to log them in to all contexts.

                If you're using makeUrl(), specify the context in the call (second argument, I think). MakeUrl() will use the current context if you don't specify one.


                Thank you for your reply.
                I didn't find the source of the problem.
                When I create 301 "manually" by clicking on the "Create a 301 redirect" button, the field is prefilled with the right site URL.

                I'm thinking about an interaction with another plugin (Babel ?).

                I have finally disabled/commented the code generating 301 redirects on alias change in the plugin and set stercseo.context-aware-alias to NO. (if on YES, 301 doesn't redirect).
                  MODX lover
                  -
                  Développeur MODX / Webdesign / Solutions web