We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33337
    • 3,975 Posts
    Quote from: killorbytes at Jul 22, 2009, 06:14 AM

    ...
    @zi any particular reason you wold move the files? Would it be just to keep everything clean?
    ..
    Yes, thats the idea. Keep it clean so you dont have to remember different places.
      Zaigham R - MODX Professional | Skype | Email | Twitter

      Digging the interwebs for #MODX gems and bringing it to you. modx.link
      • 15871
      • 105 Posts
      OK, so I moved the files and everything works nice EXCEPT with Friendly URLs. Nothing was changed in the htaccess file since the beta was a root level access (http://beta.srssoft.com)

      Are there any configs I am missing? I changed the resource browser and the file manager path.

      The htaccess is this: (wich worked on the beta)
      #Options +FollowSymlinks
      RewriteEngine On
      RewriteBase /


      # Fix Apache internal dummy connections from breaking [(site_url)] cache
      RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
      RewriteRule .* - [F,L]

      # The Friendly URLs part
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
        • 5689
        • 289 Posts
        I believe there are two places in the System Settings that you need to change with the updated path. Check into that, clear the cache, and things will hopefully work right. smiley
          I'm learning more about MODx all the time and loving it.
          • 15871
          • 105 Posts
          Got it! It wasn’t the settings. This has happened to me before where the htaccess file is not being read at all. What has happened in the past is that the encoding was set for Mac, instead of UNIX. However. To solve that I would just edit it in BBEdit, change the encoding and ftp up. THIS time, the encoding was accurate. I un commented a line and did not get the 500 error, so I knew it was the same issue. What I need was take the default ht.access file and rename it (and delete the ol one of course) et voila!

          Thanks again for everyone’s help. smiley
            • 5689
            • 289 Posts
            Glad it’s all working for you!
              I'm learning more about MODx all the time and loving it.
              • 15871
              • 105 Posts
              Hey Compgeek,

              So everything is over fine, but I have an issue. The MOD_rewrite seems to be interfering with the 301 Redirects I want to do. Instead ofdoing an actual redirect, it is doing the following:

              # Redirect old URLs
              Redirect 301 /srs_in_the_media.php http://srssoft.com/news-srs-in-the-media

              Link in Browser does this:
              http://srssoft.com/news-srs-in-the-media?q=srs_in_the_media.php


              Here’ my rewrite rule:

              # The Friendly URLs part
              RewriteCond %{REQUEST_FILENAME} !-f
              RewriteCond %{REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

              Thoughts?
                • 5689
                • 289 Posts
                Hey killorbytes,

                I’m very sorry I didn’t reply until now. I was going all weekend and didn’t get a chance to get on here. sad

                Anyway, I don’t see anything that would be the problem, but would you mind posting the whole .htaccess file?

                Also, could you explain more about your custom 301 errors? How are you accomplishing them? I don’t quite understand why you mean by "Redirect 301 /srs_in_the_media.php http://srssoft.com/news-srs-in-the-media"

                Thanks! I should be able to get back to you more quickly this time. smiley
                  I'm learning more about MODx all the time and loving it.
                  • 33372
                  • 1,611 Posts
                  For some reason that I’ve never bothered to investigate, traditional redirects like that and mod_rewrite rules are not compatible. I just either create weblinks within MODx to forward my old pages (using the SEO Strict URLs plugin and including the .php extension in the alias of the weblink) or I create physical files for each redirected old page with just a php header redirect in them (which I delete about 60 days after launching the new site, as long as no one is still using them). There’s probably a logical and obvious reason why the way that you’re trying to do it doesn’t work, and one of these days I may actually take the time to figure it out.

                  BTW, I usually develop sites in a subdirectory when the old site needs to stay live during development of a new one, and I always move MODx to the root when it’s time to launch (it just seems sloppy to leave it in a subdirectory).
                    "Things are not what they appear to be; nor are they otherwise." - Buddha

                    "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                    Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                    • 15871
                    • 105 Posts
                    The subdirectory and move was the way to go. To wrap up the 301 issue, I needed to use a Rewrite rule instead of a 301 redirect and that fixed it! Here’s an example:
                    RewriteRule ^pressroom_july8.php$ http://srssoft.com/news-academy-womens-healthcare-associates-selects-srs [R=301,L]