We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36786 ☆ A M B ☆
    • 209 Posts
    Has anyone gotten Redirector to function properly under modx 2.3? I have a site that has had MANY evolutions over the years but many important links of the wrong URLs exit on other sites. I can't upgrade till I have an alternative and because of the need for URL "patterns" I'm pretty sure SEO Tab won't work as a solution (even though I love it).
      Ben Morrison
      Hacking templates to pieces since 2003
      • 5160
      • 118 Posts
      I had the same issue recently with a site served by IIS. Rather than try to fix the issue Redirector I took the easy way out and used the IIS URL Rewrite Module. In order to avoid cluttering the web.config file I moved them to an external file. The setup is:

      web.config

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
          <system.webServer>
      
      		<rewrite>
                  <rewriteMaps configSource="rewritemaps.config" />
              </rewrite>
      
      	</system.webServer>
      </configuration>


      rewritemaps.config

      <rewriteMaps>
          <rewriteMap name="Redirects">
              <add key="/oldpage.html" value="/new/page.html" />
          </rewriteMap>
      </rewriteMaps>


      It's not as user friendly as Redirector but it does cut out the need for the PHP Engine so it's faster.

      I believe the .htaccess equivalent if you use Apache is something like:

      Options +FollowSymlinks
      RewriteEngine on
      rewriterule ^old/page.php(.*)$ http://newdomain.com/new/page.php$1 [r=301,nc]