We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50205
    • 2 Posts
    As the title suggests, I am unable to get friendly URLs to work. I followed the MODx instructions on activating FURLs. I've sifted through and implemented various solutions that I've found on this forum and via Google but I've come up empty handed.

    Some details:
    1. Running the latest Revolution
    2. The site works fine when FURLs are turned off
    3. FURLs are turned on
    4. The FURL rewrite seems to work fine. Ex: typing in "/index.php?id=2" redirects to "/contact.php" but I get a 404 error (same with the rest of the pages)
    5. I did a test where I "rewrote" (via .htaccess) test.php to test2.php (these pages were not created via MODx, I just dropped them in the root), I got a 404 error when trying to visit test.php. This result doesn't make sense with the previous point. Removing the .htaccess file allowed me to visit test.php. This test worked when done on a nonMODx site (same server and host).
    6. I tried adding "Options +FollowSymLinks" before "RewriteEngine On", no luck
    7. Server is Apache, host is GoDaddy
    8. And last but not least, the first day I installed the site, I got FURLs to work for about 10-15 minutes. I created some pages and I *think* I didn't do anything to the System Settings or anything that should have caused FURLs to break but they seemingly randomly stopped working.
    9. MODx is installed in the root
    10. I've cleared the cache more times than I can count

    This is my entire .htaccess file:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    I think maybe MODx is somehow blocking or interfering with Apache's mod_rewrite. Does that make sense considering detail #4? It does with detail #5.

    Let me know what other details I can provide to help solve this problem!

    Thank you!
      • 3749
      • 24,544 Posts
      MODX is definitely not messing with mod_rewrite (it happens before MODX is running), but GoDaddy might be. They are notorious for trouble with MODX.

      The problem you're describing is most often caused by the RewriteBase line.

      Or: http://bobsguides.com/modx-friendly-hosts.html wink
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 50205
        • 2 Posts
        Thanks for the reply, BobRay. I literally found the solution to my problem about 2 minutes before your reply. Funny how that works!

        I actually found what I needed to do in the Evo 1.0 docs at:
        http://rtfm.modx.com/evolution/1.0/administration/friendly-url-solutions

        "If you're working off of virtual domains and have a preview for development or while waiting for DNS updates to occur such as accessing your site through http://10.0.0.1/~myacct, the rewrite rule should be written as follows. Don't forget to change it back when you go live."

        I changed my RewriteRule to "RewriteRule ^(.*)$ /~myacct/index.php?q=$1 [L,QSA]"
        (obviously replacing "myacct" with my MODx site's account name)

        I'm facepalming at myself for spending so long on this problem when the solution was staring me right in the face (URL bar)! Maybe I missed it in the Revo docs but I think that tidbit of information should definitely be put in if it's not there already (just in case other people are as unfamiliar with .htaccess files and rewrites as I am wink ).

        Now I have to remember to change it back when I set up the domain name... lol.

        Thanks to all who checked this thread!