We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21056
    • 327 Posts
    This is an auto-generated support/comment thread for Missing.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    Redirects old URLs to new ModX pages. Designed to make site migration to Modx, and avoid 404 not found pages.
      Author: ManagerManager plugin - customise your ModX manager interface

      Rckt - web development, Sheffield, UK
      • 25663 MODX Staff
      • 12,272 Posts
      Very cool and needed plugin. Thanks for sharing. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 6726
        • 7,075 Posts
        Indeed very cool and I’ll soon have a use for it, thanks for sharing grin

        I have looked at the code, and it uses 301 redirect which is cool for SEO, cherry on the cake cool
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 9908
          • 9 Posts
          This is EXACTLY what I was looking for. Unfortunately, it simply doesn’t work on my site. Just for testing, when I redirect ’testing.html’ to an existing document ID, Modx still shows the standard 404 page. Any suggestions?

          Okay, I think I found the problem: I have friendly URLs activated and consequently there is a mod rewrite in the .htaccess that modifies the URL of the requested file (to a index.php?q=[requested-file] scheme) before the plugin has a chance to redirect it to the new file :-(

          Any idea how to get this to work with friendly URLs active?
            • 16085
            • 203 Posts
            yeah I get the same issue if Friendlys are on or off.. sad just getting redirect to the stand error page set in the config panel.

            which is a real shame because I need to catch some old urls and redirect them and this is perfect!
              • 2299
              • 62 Posts
              On my website, it works for URLs that are at the root, but it doesn’t work with repertories.

              Exemple :
              www.soleil.info/loisirs/ => it works
              www.soleil.info/loisirs/activites.php => it doesn’t work

              Does anybody know how to fix this ?
                • 11975
                • 2,542 Posts
                Hi,

                perhaps you should give a try to virtual alias from Appox

                :)

                http://www.stanback.net/code/modx/virtual-aliases.html
                  Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                  • 16085
                  • 203 Posts
                  @heliotrope. thanks for that! I can’t belive I missed that given his also did FeedX.

                  This should work well Error 404 Logger then. smiley
                    • 21056
                    • 327 Posts
                    could someone post the contents you’ve entered in , that don’t work?
                      Author: ManagerManager plugin - customise your ModX manager interface

                      Rckt - web development, Sheffield, UK
                      • 26334
                      • 77 Posts
                      Same problem - doesn’t work for friendly URLs.

                      I made a bit of a mod and this works however. Not perfect but better than nothing.

                      Create a custom error page and set that in tools | configuration

                      In that page make it non cacheable and call a snippet which I called redirect

                      The snippet redirect is as follows:
                      <?php
                      $redirect = array(
                      '/directory1/' =>2438,
                      '/directory1/index.html' =>2438
                      );
                      
                      $referring_url = getenv("REQUEST_URI");
                      #echo 'Referring url = '.$referring_url.' redirecting to :'.$redirect[$referring_url];
                      if (isset($redirect[$referring_url])) {
                      	$modx->sendRedirect($modx->makeUrl($redirect[$referring_url], '', '', 'full'), 0, 'REDIRECT_HEADER', '301');
                      }
                      ?>
                      


                      Make the array as long as you want of all the urls you wish to redirect. You can uncomment the echo and comment out the if statement to test.

                      I know of the limitations with the REQUEST_URI in that it is blocked by some corporate networks etc but this will get 99% of home users and plenty of others.

                      If you make that page a generic not found 404 with some useful links that caters for those as well.

                      Hope this helps.