We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    Hmmm.... dunno if it works with subdomains... haven’t tested that thoroughly, but I bet it will by tweaking the rewrite rule a bit. Someone should have an answer soon.

    Try this:
    RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]


    The RewriteRule "/var/CMS/MODx" part is defnitely not right as that’s a filesystem path and mod-rewrite works on URLs.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 32241
      • 1,495 Posts
      Most of my development sites are setup using subdomain, but never have any problem in what so ever. It might be a different configuration from your host. DO they have like KB or FAQ? Try to ask support from them, whether do they know any known problem if you setup a subdomain the way you use it. I might be wrong though, it might not be the problem from the server. BUt it won’t hhurt to give it a shot wink
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 23851
        • 19 Posts
        Okay, I finally tracked it down. Turns out my .htaccess file wasn’t being processed at all! Once I added the following to my httpd.conf file, the friendly URL’s began working as expected.

        <Directory "/var/CMS/MODx">
        Options FollowSymLinks
        AllowOverride All
        </Directory>

        Thanks for your help.
          • 10487 MODX Staff
          • 1,535 Posts
          Aha! That would’ve been a bit of a show stopper. Glad you got it sorted out smiley
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 14779
            • 256 Posts
            I am having a bit of trouble with friendlu URLS. My problem seems to be a bit different than any of the other posts. I have a 1and1 home hosting account, and I have my domain’s destination set to /staging. I’m pretty sure that this is the equivalent of setting the root of the webspace to the /staging subdirectory. When I enable FURL’s and try to access a web page, I get a 500 error : internal server error.
            I renamed the .htaccess file. I tried putting the .htaccess file in the root of the webspace or in the /staging sub-dir.
              PM me to find out how you can get a FREE ipad 2!
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: joshlfisher at May 24, 2006, 12:13 PM

              I am having a bit of trouble with friendlu URLS. My problem seems to be a bit different than any of the other posts. I have a 1and1 home hosting account, and I have my domain’s destination set to /staging. I’m pretty sure that this is the equivalent of setting the root of the webspace to the /staging subdirectory. When I enable FURL’s and try to access a web page, I get a 500 error : internal server error.
              I renamed the .htaccess file. I tried putting the .htaccess file in the root of the webspace or in the /staging sub-dir.

              See if the 500 error is related to issues described here and in several other posts regarding the php directives and other extras in the .htaccess file.
                • 14779
                • 256 Posts
                I actually got it working.
                I just rewrote the .htaccess file:

                Old wording:

                RewriteEngine On
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


                New Wording:

                RewriteEngine on
                RewriteBase /
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]


                Changes:
                Changed uppercase On to on
                added line: RewriteBase /
                  PM me to find out how you can get a FREE ipad 2!
                  • 17673
                  • 194 Posts


                  Just a note for anyone having trouble with FURLS: I got it working on my server by commenting out the 2 lines:

                  php_flag zlib.output_compression On
                  php_value zlib.output_compression_level 5

                  I tried this after checking the httpd log ...did not have time to find out how to change the Apache conf to support these directives.
                    ----------------------------------------------------------
                    http://www.linkedin.com/in/lucapost/
                    http://www.twitter.com/lukwe/
                    ----------------------------------------------------------
                    • 4589
                    • 1 Posts
                    Quote from: joshlfisher at May 25, 2006, 12:14 PM

                    I actually got it working.
                    I just rewrote the .htaccess file:
                    ...
                    Changes:
                    Changed uppercase On to on
                    added line: RewriteBase /
                    You actually made one more change: added a / before index.php
                    Both options work: the rewriteBase and the /index.php. I don’t know if adding both will cause some trouble later on. Anyway, this very posting helped me solf the problem I was working at for 3 nights to get MODx working on my subdomain. So, thanks for posting.
                      • 715
                      • 15 Posts
                      None of those syntax changes change a thing, people developing on their test boxes should check the default directory settings and make sure you setup the default dir restrications, otherwise the rewriting engine won’t be activated.

                      <Directory />
                      ...
                      AllowOverride All -> or something less restrictive but you want to be able to override the .htaccess
                      </Directory>

                      Thought this might help a few folks out there to save some time.