We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37815
    • 25 Posts
    Hi, I have installed Modx Revolution on Xampp on Windows and everyting is fine execpt I can't get FURLS to work.

    I have followed the instructions the wiki http://wiki.modxcms.com/index.php/Friendly_URLs_Guide#Friendly_urls_with_mod_rewrite and set up Apache httpd.conf file to aloow mod_rewrite and changed the ht.access file to .htaccess and changed the LoadModule rewrite_module modules/mod_rewrite.so. I have also set up friend URLs in the manager itself. I got them to work fine on another site which was live rather than on local host so I guess it is something to do with the xampp set up but I don't know what to try next.

    The home page loads fine, but if you got to anther page with an alias it jumps back to the xampp welcome screen. Can anyone offer any advice at all please?

    This question has been answered by bridgetdesigns. See the first response.

      • 10208 ☆ A M B ☆
      • 1,780 Posts
      Been dealing with this on a couple of my xampp sites as well. I think I just figured it out.

      in .htaccess, set the rewrite base to the root folder in your htdocs where the site is located.

      RewriteBase /YourSitesRootFolder


      I tested it on two of my non-working xamp sites and both worked afterwards. One of the sites simply had the rewrite base incorrect, the other had nothing defined.



        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 37815
        • 25 Posts
        thank for the reply, I tried it but now I get a 500 server error - perhaps I have got the file path wrong? Do I just need to put the folder the site is in, or do I need the full path?
        • discuss.answer
          • 37815
          • 25 Posts
          Actually, hang on, I just had the syntax wrong - I had put a space between RewriteBase / and my root folder, removed the space and it now works perfectly, thank you so much!
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            I've got it written just as shows above. With just the folder name after the backslash like this.

            RewriteBase /foldername

            Here's a copy of the full .htaccess file contents from one of the working test sites that wasn't working half an hour ago.


            # MODX supports Friendly URLs via this .htaccess file. You must serve web
            # pages via Apache with mod_rewrite to use this functionality, and you must
            # change the file name from ht.access to .htaccess.
            #
            # Make sure RewriteBase points to the directory where you installed MODX.
            # E.g., "/modx" if your installation is in a "modx" subdirectory.
            #
            # You may choose to make your URLs non-case-sensitive by adding a NC directive
            # to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
            
            RewriteEngine On
            RewriteBase /revolution
            
            
            
            # 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\.example-domain-please-change\.com [NC]
            #RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
            
            
            
            # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 
            # https://www.domain.com when your cert only allows https://secure.domain.com
            #RewriteCond %{SERVER_PORT} !^443
            #RewriteRule (.*) https://example-domain-please-change.com.com/$1 [R=301,L]
            
            
            
            # The Friendly URLs part
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
            
            
            
            # Make sure .htc files are served with the proper MIME type, which is critical
            # for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
            
            #AddType text/x-component .htc
            
            
            
            # If your server is not already configured as such, the following directive
            # should be uncommented in order to set PHP's register_globals option to OFF.
            # This closes a major security hole that is abused by most XSS (cross-site
            # scripting) attacks. For more information: http://php.net/register_globals
            #
            # To verify that this option has been set to OFF, open the Manager and choose
            # Reports -> System Info and then click the phpinfo() link. Do a Find on Page
            # for "register_globals". The Local Value should be OFF. If the Master Value
            # is OFF then you do not need this directive here.
            #
            # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
            #
            # Your server does not allow PHP directives to be set via .htaccess. In that
            # case you must make this change in your php.ini file instead. If you are
            # using a commercial web host, contact the administrators for assistance in
            # doing this. Not all servers allow local php.ini files, and they should
            # include all PHP configurations (not just this one), or you will effectively
            # reset everything to PHP defaults. Consult www.php.net for more detailed
            # information about setting PHP directives.
            
            php_flag register_globals Off
            
            
            
            # For servers that support output compression, you should pick up a bit of
            # speed by un-commenting the following lines.
            
            #php_flag zlib.output_compression On
            #php_value zlib.output_compression_level 5
            
            
            
            # The following directives stop screen flicker in IE on CSS rollovers. If
            # needed, un-comment the following rules. When they're in place, you may have
            # to do a force-refresh in order to see changes in your designs.
            
            #ExpiresActive On
            #ExpiresByType image/gif A2592000
            #ExpiresByType image/jpeg A2592000
            #ExpiresByType image/png A2592000
            #BrowserMatch "MSIE" brokenvary=1
            #BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
            #BrowserMatch "Opera" !brokenvary
            #SetEnvIf brokenvary 1 force-no-vary
            


              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 37286
              • 160 Posts
              I know this post is a little old, but I just spent two hours trying to get xampp to work with mod_rewrite and I wanted to share this bit of knowledge, if for no other reason than for me to reference later if I need.

              First ensure that the rewrite_module is not commented out:
              LoadModule rewrite_module modules/mod_rewrite.so

              Second, if set to "AllowOverride None" in the below three places, change to "AllowOverride All" :
              <Directory />
                  Options FollowSymLinks
                  AllowOverride All
                  Order deny,allow
                  Deny from all
              </Directory>
              <Directory "C:/xampp/htdocs">
                  #
                  # Possible values for the Options directive are "None", "All",
                  # or any combination of:
                  #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
                  #
                  # Note that "MultiViews" must be named *explicitly* --- "Options All"
                  # doesn't give it to you.
                  #
                  # The Options directive is both complicated and important.  Please see
                  # http://httpd.apache.org/docs/2.2/mod/core.html#options
                  # for more information.
                  #
                  Options Indexes FollowSymLinks Includes ExecCGI
              
                  #
                  # AllowOverride controls what directives may be placed in .htaccess files.
                  # It can be "All", "None", or any combination of the keywords:
                  #   Options FileInfo AuthConfig Limit
                  #
                  AllowOverride All
              
                  #
                  # Controls who can get stuff from this server.
                  #
                  Order allow,deny
                  Allow from all
              
              </Directory>
              Alias /myphpprojects "C:/xampp/htdocs"
              <Directory "C:/xampp/htdocs">
                  AllowOverride All
                  Options None
                  Order allow,deny
                  Allow from all
              </Directory>
              *Note: The location of your xampp folder may differ from the one shown here*

              Finally, add an .htaccess file to the htdocs folder with:
              RewriteEngine On
              RewriteBase /
              options +FollowSymLinks

              Also note that this solution may or may not work for you, it depends on the version of xampp you have installed and the settings you currently have set on your machine.