We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6531
    • 154 Posts
    I can’t get friendly URLs to work on my dreamhost account.

    I tried to set up the .htaccess but it completely broke the site.

    I think the RewriteBase may be wrong. Not sure if it should be "/" or the path to my site folder (i.e., /home/user/domain.com)

    I’m also not quite sure how to set up the settings in modx (revo) correctly -- there are so many.

    Can anyone help?


    My .htaccess:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
    
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    
      • 10076
      • 1,024 Posts
      On Revo I use this for the .htaccess
      RewriteEngine On
      RewriteBase /
      
      # Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
      #RewriteCond %{HTTP_HOST} .
      #RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
      #RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
      #
      # or for the opposite domain.com -> www.domain.com use the following
      # DO NOT USE BOTH
      #
      RewriteCond %{HTTP_HOST} .
      RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
      RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
      
      
      
      # The Friendly URLs part
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
      


      And I just activate friendly URL s plus I activate the "Automatically generate alias". But that is not what makes it function.

      Off course "RewriteBase /" indicates modx installed in the www root of your webserver
        • 6531
        • 154 Posts
        Yours looks identical to mine ... are you on Dreamhost?
          • 10076
          • 1,024 Posts
          It does not quit look identical, even before my lates edit.
          Comment out the third line:
          RewriteEngine On
          RewriteBase /
          #RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]