We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28715
    • 16 Posts
    Hi,

    Can someone help me with setting up Friendly URL using Apache?

    Once I switch these on, the pages go to 404 page not found!

    Thanks,

    Stuart
      • 4310
      • 2,310 Posts
      Have you enabled FURL’s from the Manager & renamed ht.access to .htaccess in your root folder?
        • 28715
        • 16 Posts
        Yeah I have changes these, but the problem still seems to be their, how many places does this have to be changed?
          • 4310
          • 2,310 Posts
          Is your site in a sub-folder rather than the root?
          Is mod_rewrite a loaded module in your PHP info?
            • 27347
            • 65 Posts
            Do you have the correct RewriteBase in .htaccess?
              • 28715
              • 16 Posts
              I am new to modx development, could you expand on what need to be included in .htaccess?

              In root .htaccess file:

              # -FrontPage-

              IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

              <Limit GET POST>
              order deny,allow
              deny from all
              allow from all
              </Limit>
              <Limit PUT DELETE>
              order deny,allow
              deny from all
              </Limit>
              AuthName gregsbootcamp.co.uk
              AuthUserFile /home/z02greg/public_html/_vti_pvt/service.pwd
              AuthGroupFile /home/z02greg/public_html/_vti_pvt/service.grp

              In Manager .htaccess file:

              RewriteEngine Off

              <IfModule mod_security.c>
              # Turn the filtering engine Off
              SecFilterEngine Off
              </IfModule>
                • 3109 ☆ A M B ☆
                • 894 Posts
                In your modx installation folder there is a file called ht.access rename this file to .htaccess and keep it in the same directory no need to move it.

                In system settings make sure you have these options enabled.



                Good luck.
                  Benjamin Marte
                  Interactive Media Developer
                  Follow Me on Twitter | Visit my site | Learn MODX
                  • 4310
                  • 2,310 Posts
                  That doesn’t look anything like the standard root .htaccess file from MODx.
                  If you’re using Evolution it should look something like this :
                  # 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 /portandratx.com
                  
                  # 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]
                  
                  # Reduce server overhead by enabling output compression if supported.
                  #php_flag zlib.output_compression On
                  #php_value zlib.output_compression_level 5
                    • 3109 ☆ A M B ☆
                    • 894 Posts
                    It seems like he’s looking at the .htaccess on his root folder this is the one provided by your host, do not delete it or change anything in it unless you know what your doing.

                    The htaccess file we are talking about is the one that is in the directory where you installed modx to so it should be in the same folder where your assets folder is.
                      Benjamin Marte
                      Interactive Media Developer
                      Follow Me on Twitter | Visit my site | Learn MODX
                      • 28715
                      • 16 Posts
                      Thank you for your reply, I will try these and let you know how I get on!

                      Stuart