We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16085
    • 203 Posts
    Has anyone else experienced any problems with Virtual Aliases plugin when SuPHP for PHP and SuExec is installed?

    Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
    Content-Length: 853
    Connection: close
    Content-Type: text/html; charset=iso-8859-1

    500 Internal Server Error

    Before that I had the configuration of ’dso’ and it was fine.. huh
      • 16085
      • 203 Posts
      I’ve just re-uploaded a fresh install of MODx 0.9.6.1p2 and added Virtual Aliases plugin, think ing that a new install would get all the appropriate permissions etc.. But I’m still getting a ’302 Moved Temporarily.. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.’ And the same reponse header error as previous post.
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Hello,

        Make sure your files are chmod 644 and folders 755 and that should fix your problems.

        AMDbuilder
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 16085
          • 203 Posts
          @AMDBuilder, yeah I’ve checked that. I’ve checked through the folders/files and the new permission got set according to the ’Securing your Site -http://wiki.modxcms.com/index.php/Securing_your_site’ wiki post when it was uploaded.

          Virtual Aliases - http://www.stanback.net/code/modx/virtual-aliases.html is a MODx plugin so I’m not sure CHMOD would have affected it as it doesn’t have any file included. It uses a TV that list the re-directed page and uses the ’OnPageNotFound’ on the SystemEvent.

          I checked the Log file and for Virtual Aliases plugin calls and this is what I’m seeing:
          213.xxx.xxx.xxx - - [03/Jun/2008:11:00:26 +0100] "GET /modx096/old-page HTTP/1.1" 500 857 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"
          Is there any where else I can look to dubug this because I’ve been using it lot to re-direct old page!? sad
            • 16085
            • 203 Posts
            Still haven’t got this sorted. Can anyone else shed some light?? huh
              • 10449
              • 956 Posts
              Don’t have time to install + test this myself, but sendRedirect with header should include the entire header, not just the numeric code (at least according to the Wiki)
              http://wiki.modxcms.com/index.php/API:sendRedirect

              plugin code: $modx->sendRedirect($pageUrl, 0, "REDIRECT_HEADER", "301"); // Send a permanent redirect
              suggested usage acc. to API doc: $modx->sendRedirect($pageUrl, 0, "REDIRECT_HEADER", ’HTTP/1.1 301 Moved Permanently’);

              Also,
              if ($found)
              can be a bit misleading. $found is already defined (as zero). It would probably be safer to use:
              if($found < 1)

              The plugin either produces a redirect 301 via modx API, or a 404 header. If you get neither of those, and you’re sure you’ve setup the TV stuff correctly, the redirect 301 code block is probably the culprit.
                • 16085
                • 203 Posts
                nice one @ganeshXL!!! smiley

                Your
                suggested usage acc. to API doc: $modx->sendRedirect($pageUrl, 0, "REDIRECT_HEADER", ’HTTP/1.1 301 Moved Permanently’);
                worked a treat.

                Thank you. smiley