We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40122
    • 330 Posts
    Would anyone know how to do this?

    There is no change if I do it in the normal manner in htaccess, eg:

    Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html


    Or if I do it as someone suggested as such:

    RewriteRule ^/sale  http://www.mydomain.com/gift-sales [R=301,L]


    What is the correct way of doing this for Evo?

    Thanks!
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Both options look correct -- I've had better luck with the RewriteRule method though. Evo doesn't have much to with it: .htaccess overrides happen before Evo (or Revo, or fill-in-the-blank) gets to take a whack at it. Are you sure your .htaccess file is being parsed? A good way to test this is to temporarily type in some jibberish text and save it -- when you visit your site, you should get a 500 error if the .htaccess file is being parsed. And are you sure your server supports mod_rewrite?
        • 40122
        • 330 Posts
        Quote from: Everettg_99 at Jun 13, 2013, 12:22 AM
        Both options look correct -- I've had better luck with the RewriteRule method though. Evo doesn't have much to with it: .htaccess overrides happen before Evo (or Revo, or fill-in-the-blank) gets to take a whack at it. Are you sure your .htaccess file is being parsed? A good way to test this is to temporarily type in some jibberish text and save it -- when you visit your site, you should get a 500 error if the .htaccess file is being parsed. And are you sure your server supports mod_rewrite?

        Hmm yeah it seems to be as it should. Are their any other options for 301s? Like with PHP?
          • 2762
          • 1,198 Posts
          Try NGRedirect Plugin
          http://modx.com/extras/package/ngredirect

          Works well for long lists of 301 wink
            Free MODx Graphic resources and Templates www.tattoocms.it
            -----------------------------------------------------

            MODx IT  www.modx.it
            -----------------------------------------------------

            bubuna.com - Web & Multimedia Design
            • 22840
            • 1,572 Posts
            I don't think you need the /

            RewriteRule ^sale http://www.mydomain.com/gift-sales [R=301,L]
              • 40122
              • 330 Posts
              Quote from: banzai at Jun 14, 2013, 07:25 AM
              Try NGRedirect Plugin
              http://modx.com/extras/package/ngredirect

              Works well for long lists of 301 wink

              Hmm I have followed the instructions on the plugins page but when I get to the 2nd part:

              Go to Systemevents..
              - Check: "OnPageNotFound"


              I cannot find OnPageNotFound. Is there any other way to do this?
                • 2762
                • 1,198 Posts
                you can find OnPageNotFound in the Parser Service Events (the fifth) group, inside plugin System Event tab.
                  Free MODx Graphic resources and Templates www.tattoocms.it
                  -----------------------------------------------------

                  MODx IT  www.modx.it
                  -----------------------------------------------------

                  bubuna.com - Web & Multimedia Design
                  • 40122
                  • 330 Posts
                  Quote from: banzai at Jun 17, 2013, 07:12 AM
                  you can find OnPageNotFound in the Parser Service Events (the fifth) group, inside plugin System Event tab.

                  Thanks, I have done that now but I still cannot get it to work. It still goes to the page I set as Error Page in System Config.

                  Would you have any clues on what I can do?
                    • 13428 ☆ A M B ☆
                    • 1,031 Posts
                    Maybe the usual problem: Remove the '<?php ?>' around the plugin code in the backend.
                      • 40122
                      • 330 Posts
                      Quote from: Jako at Jun 18, 2013, 01:15 AM
                      Maybe the usual problem: Remove the '<!--?php ?-->' around the plugin code in the backend.

                      Thanks for the suggestion but that doesnt seem to be the issue either