We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26834
    • 22 Posts
    I’ve had a search but can’t find anything that helps.

    I’ve enabled friendly URLs, sorted the .htaccess file, mod_rewrite is enabled and the site is definitely looking at the .htaccess file as when I put something random at the top it throws an error. And yet the friendly URLs refuse to work! I’ve checked the error logs and there’s nothing there. Is there anything else that could be stopping it from working? Yes, modx is installed at root.

    .htaccess file:
    # For full documentation and other suggested options, please see
    # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
    # including for unexpected logouts in multi-server/cloud environments
    # and especially for the first three commented out rules

    #php_flag register_globals Off
    #AddDefaultCharset utf-8
    #php_value date.timezone Europe/Moscow

    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]

    # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    #RewriteRule (.*) http://www.example.com/$1 [R=301,L]

    # Exclude /assets and /manager directories from rewrite rules
    RewriteRule ^(manager|assets) - [L]

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

    # Reduce server overhead by enabling output compression if supported.
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5
      • 4310
      • 2,310 Posts
      I’ve had it before that the
      Options +FollowSymlinks
      directive needs to be commented out.
      Probably won’t solve it but worth a try.
        • 26834
        • 22 Posts
        Nope, didn’t work. Thank you anyway!
          • 20413
          • 2,877 Posts
          I’d transfer a copy to a local webserver (e.g. xampp)
          and test it out. If that works fine, talk to your host!
            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 26834
            • 22 Posts
            It’s still not working even locally. Now I really am confused. I’ve followed all the instructions to the letter.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              What happens? Do you get 404 Page Not Found errors? 500 server errors?
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 26834
                • 22 Posts
                It goes back to the index page. I’ve got it set to do that on 404 error though, so I’m thinking the page doesn’t exist. It’s definitely looking at the htaccess because when I put junk in it I get a 500 error.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Are you sure that you turned on Friendly URLs in the Configuration?
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 26834
                    • 22 Posts
                    Yep, I’m sure. Just to confuse things even more, I just set it to ’no’, before changing it back to yes again to see if that kicked some life into it. I refreshed the page, expecting it to not work at all...and it worked. Friendly URLs are now working with Use FriendlyURLs set to no. huh huh

                    Edit: I checked in the database, and friendly urls has a value of 0. Even more confusing.
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      That sounds very unlikely. Can you give us a URL?
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org