We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26325
    • 36 Posts
    Hi all, another newb here eager to use MODx but struggling with the FURL’s & .htaccess stuff. I’ve been reading the forums trying to figure this out and I’m getting stuck. Successfully installed v0.9.2.1 w/ the sample content on my shared hosting account at 1and1 and all was great. I am pointing a subdomain to the destination directory that the MODx is installed in. Then I proceeded to use FURL’s (Friendly URL’s for those even greener than me). Selected YES to all options and kept the defaults for prefix and suffix. Then I went and updated the ht.access file to block the zlib and set the proper file path for a 1and1 install:

    --------------

    # php_flag zlib.output_compression On
    # php_value zlib.output_compression_level 5

    # Rewrite directives here for SEF (Search Engine Friendly) URLs

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # If your MODx installation is in a subdirectory, change the following line to match the physical
    # path to the "root" of the site as follows:
    # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]

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

    ---------


    Then I uploaded the file and renamed it to .htaccess. Also renamed the ht.access file in the manager directory but made no changes to its content.

    The result is that the default main page comes up fine but if I click on any internal link (such as "Simple Blog" or "Easy Comments") I get the following error: "Error 404: NOT FOUND!
    Your browser cannot find the document corresponding to the URL you typed in."

    The ht.access instructions says "# Make sure RewriteBase points to the directory where you installed MODx." but I never see the term RewriteBase anywhere else in the file. Do I need to add it somewhere? Is this causing my problems? Yea, I know, dumb newbie question but I’m just trying to follow the instructions and it’s not adding up.

    I’m sure I’m missing something simple but I have no idea what to do next. Any suggestions?
      Visit MODx.mobi to read these forums on mobile devices.
    • # If your MODx installation is in a subdirectory, change the following line to match the physical
      # path to the "root" of the site as follows:
      # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]

      is probably the answer to your problem. If you have your MODx installed in a subfolder of your web space (such as /modx/) then you need to use the above line, like
      RewriteRule ^(.*)$ /modx/index.php?q=$1 [L,QSA]
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 26325
        • 36 Posts
        Quote from: sottwell at Aug 04, 2006, 11:04 PM

        # If your MODx installation is in a subdirectory, change the following line to match the physical
        # path to the "root" of the site as follows:
        # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]

        is probably the answer to your problem. If you have your MODx installed in a subfolder of your web space (such as /modx/) then you need to use the above line, like
        RewriteRule ^(.*)$ /modx/index.php?q=$1 [L,QSA]

        I gave this a try but I get the same result. I go to the main page fine but when I click on a link I get the same 404 error saying it couldn’t find the page. These links work fine if I switch to non-furl mode.

        Any other suggestions out there for a desperate newb?
          Visit MODx.mobi to read these forums on mobile devices.
        • Do you have a link so we can take a look at what’s happening?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 26325
            • 36 Posts
            Quote from: sottwell at Aug 05, 2006, 03:15 AM

            Do you have a link so we can take a look at what’s happening?
            Yes, go to modx.pngid.com and then click on Simple Blog or Easy Comments. Thanks for taking a look laugh
              Visit MODx.mobi to read these forums on mobile devices.
              • 33337
              • 3,975 Posts
              What is the actual directory from your hosting root folder?

              e.g. /subdomains/modx ?
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 26325
                • 36 Posts
                Quote from: zi at Aug 05, 2006, 04:49 AM

                What is the actual directory from your hosting root folder?

                e.g. /subdomains/modx ?
                I don’t understand your question well enough to answer it accurately. What is a "hosting root folder?" At the 1and1 domain admin panel, I set up a "destination" for any domain or subdomain. In my specific case, I have modx.pngid.com set to the destination directory "name_modx1". As far as I know, this directory is now considered the "root". I did not add any sub directories. I installed the MODx 0.9.2.1 files via an FTP client into this "root" directory.

                Are you referring to a different root on the server that exists prior to my administration?

                Again, the site works fine until I switch to FURLs. Then any link from the main page gives the 404 error.

                For reference, I have successfuly installed Mambo, Joomla! and Drupal in this environment so I’m not sure what is going wrong here.

                To bump up a previous question about the .htaccess file... the instructions say...
                # Make sure RewriteBase points to the directory where you installed MODx.
                but there is no RewriteBase anywhere in the file. Is this the same as RewriteRule? Is something missing in the .htaccess file?

                Thanks for all your help with this.
                  Visit MODx.mobi to read these forums on mobile devices.
                • What is your full path to your index.php file?

                  example: /home/sites/mysite.com/public_html/
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 26325
                    • 36 Posts
                    Quote from: sottwell at Aug 05, 2006, 07:17 AM

                    What is your full path to your index.php file?

                    example: /home/sites/mysite.com/public_html/
                    In my FTP client, index.php is in the root, so it would be /index.php.

                    However, to the best I can determine, the server path is /homepages/25/accountnumber/name_modx/index.php

                    The /homepages/25/accountnumber is assigned to me and I am unable to make any changes to it.

                    I created the name_modx and it is the "root" destination for the subdomain modx.pngid.com

                    I have tried both of these (and any combo I can think of) in the .htaccess file to no avail.

                    Is this the info you are asking for?
                      Visit MODx.mobi to read these forums on mobile devices.
                      • 26325
                      • 36 Posts
                      I am no .htaccess expert (obvious from previous posts), but I looked into the files of both Joomla and Drupal and they both have this line of code:
                      RewriteBase /
                      but the MODx file does not have this line. I know I’ve asked it before but should it be in there somewhere or is it irrelevant?
                        Visit MODx.mobi to read these forums on mobile devices.

                      This discussion is closed to further replies. Keep calm and carry on.