We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26325
    • 36 Posts
    Still no success in getting FURL’s to work. I’ve completely reinstalled, tried many variations of file paths in the .htaccess but the same problems occur as described in the previous 2 or 3 posts in this thread.

    Can anyone offer me some additional direction in how to resolve this? Am I overlooking a variable beyond the .htaccess file and the Sys Config FURLs admin panel? Is it wrong of me to assume FURL’s should work with the default sample site right out of the box? I’m really eager to start building with this product but it kind of moot without Friendly URL’s.

    Signed...Desperate huh
      Visit MODx.mobi to read these forums on mobile devices.
      • 22800
      • 9 Posts
      Here is the .htaccess I use to get it to work on 1and1.  Hopefully this will help other 1and1 users.  This works for 1and1 domains where the root of the domain is pointed at a subdirectory.  Works like a champ on several sites. The key was the RewriteBase / which isn’t included in the default .htaccess that comes with the install package.

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

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

      RewriteEngine on

      RewriteBase /

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

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

        • 26325
        • 36 Posts
        Quote from: paulblackgsx at Aug 08, 2006, 03:22 PM

        Here is the .htaccess I use to get it to work on 1and1. Hopefully this will help other 1and1 users. This works for 1and1 domains where the root of the domain is pointed at a subdirectory. Works like a champ on several sites. The key was the RewriteBase / which isn’t included in the default .htaccess that comes with the install package.

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

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

        RewriteEngine on

        RewriteBase /

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

        RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
        Hi and thank you very much for the feedback. I copied this verbatim into my .htaccess file, deleted everything else and still not working. Main page comes up but the links give a 404 error. What are you selecting in the Friendly URL settings admin panel?

        Since it’s working for you, I assume I am doing something else wrong but all I’ve done is the standard install and I’m following all the documentation to the letter. Once I figure this all out I want to prep some documentation to help others avoid whatever silly little problem that is holding me up.
          Visit MODx.mobi to read these forums on mobile devices.
          • 22800
          • 9 Posts
          Quote from: scandiman at Aug 08, 2006, 04:32 PM

          Quote from: paulblackgsx at Aug 08, 2006, 03:22 PM

          Here is the .htaccess I use to get it to work on 1and1.  Hopefully this will help other 1and1 users.  This works for 1and1 domains where the root of the domain is pointed at a subdirectory.  Works like a champ on several sites.  The key was the RewriteBase / which isn’t included in the default .htaccess that comes with the install package.

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

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

          RewriteEngine on

          RewriteBase /

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

          RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
          Hi and thank you very much for the feedback. I copied this verbatim into my .htaccess file, deleted everything else and still not working. Main page comes up but the links give a 404 error. What are you selecting in the Friendly URL settings admin panel?

          Since it’s working for you, I assume I am doing something else wrong but all I’ve done is the standard install and I’m following all the documentation to the letter. Once I figure this all out I want to prep some documentation to help others avoid whatever silly little problem that is holding me up.

          Use friendsly URL: Yes
          Prefix: [Blank]
          Suffix: .html
          Use friendly Alias: Yes
          Use friend paths: No
          Allow duplicates: Yes
          Automatically Generate: Yes

          Hope this helps. Send me a PM if you need some additional assistance and want to take it offline.
            • 26325
            • 36 Posts
            Happy to report that it now works fine. paulblackgsx confirmed my htaccess and settings were good and made a passing comment that it is acting as if it doesn’t see the file at all. That gave me the idea to switch to a different plaintext editor. Resaved the file and it works great now. Something I’ve used for years now decides to add some hidden characters. What a stupid problem but it is always good to go back to the basics sometimes.

            All of this did reveal though that the default .htaccess file is missing something. paulblackgsx pointed out that "RewriteBase /" should be added into the .htaccess code. Is there some place to report something like this?
              Visit MODx.mobi to read these forums on mobile devices.
            • Quote from: scandiman at Aug 08, 2006, 11:53 PM

              All of this did reveal though that the default .htaccess file is missing something. paulblackgsx pointed out that "RewriteBase /" should be added into the .htaccess code. Is there some place to report something like this?

              Honestly, the presence or non-presence of the RewriteBase is not always necessary. It pretty much depends on where and how your site is configured, and how it is going to interact with other traditional web resources within the same space. I’ve even run into several cases where using RewriteBase was in fact breaking the rules, so I’m not convinced this needs to be in the default .htaccess code. However, my expertise with mod_rewrite is infantile at best, so, others with better experience here, please chime in if you think this should be a standard part of the .htaccess we provide as a starting point.
                • 22815
                • 1,097 Posts
                paulblackgsx didn’t actually say it should be added to the default .htaccess, he just said that it’s not in the default one and people need to add it if they have a particular setup.

                With that in mind, I chime in with "have it in there but commented out, with a note suggesting that people take it out if the root of the domain is pointed at a subdirectory".

                That would seem like the best solution all around.
                  No, I don't know what OpenGeek's saying half the time either.
                  MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                  Forum: Where to post threads about add-ons | Forum Rules
                  Like MODx? donate (and/or share your resources)
                  Like me? See my Amazon wishlist
                  MODx "Most Promising CMS" - so appropriate!
                  • 22800
                  • 9 Posts

                  Yeah, it won’t be needed in all cases, but likely would be helpful to anyone using a host that hosts multiple domains, with each domain in a subdirectory, and the domain is pointed at the subdirectory so it operates like it’s the root.

                  Including it in the default folder remarked out may not be a bad idea if a lot of other people on hosting solutions other than 1and1 run into this problem.

                  Glad I could help. I hope this info comes in handy to other people as well.
                    • 7860
                    • 7 Posts
                    Hi! Im new to using modx and php, but ive had experiences using cms built in Java. (openCms, lenya).
                    So far, im having more fun using modx! wink Props!

                    Anyway, here’s what i can contribute:

                    For those who are trying to install a staging site on Windows, this can help you in configuring FURLs:

                    Specs:
                    Windows XP
                    Apache2
                    MySQL 5
                    PHP 5.1.4

                    1) Go to administration -> System Configuration -> Friendly URL Settings
                    2) Set Use Friendly URLs to Yes. Just set every option by default for now.
                    3) Rename ht.access to .htaccess inside modx root. (i.e. C:\Apache2\htdocs\modx\ht.access -> C:\Apache2\htdocs\modx\.htaccess)
                    4) Edit .htaccess
                    comment these lines,
                    php_flag zlib.output_compression On
                    php_value zlib.output_compression_level 5

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

                    5) Edit the configuration file of Apache 2.
                    Uncomment this line,
                    #LoadModule rewrite_module modules/mod_rewrite.so

                    and change this

                    #
                    # 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 None

                    into
                    #
                    # 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

                    Note: There are about 5-6 AllowOverride string inside httpd.conf. Change the one above specifically. smiley

                    6) Reload Apache.

                    That’s it! Whew! smiley
                      • 20765
                      • 90 Posts
                      myfriendscallmebill Reply #40, 17 years, 9 months ago
                      Howdy, I’ve spent hours looking/searching through the forum and haven’t seen my problem addressed (in a form I ’d recognize ;-), so I’ll try asking here:

                      I’ve been building a MODx site for a few weeks now. I intially set it up (successfully) to use friendly URLs in the form:

                      <domain>/<alias>.html

                      Now I’ve decided that I’d rather use IDs rather than aliases, with URLs in the form:

                      <domain>/<id>.html

                      But when I turn off "use friendly aliases" in the System Configuration portion of the Manager, any time I try to go beyond the home page, either by clicking a link on the home page or by typing in the URL manually (<domain>/<id>.html) my "page not found" page is displayed (that’s error 404 isn’t it?).

                      When I turn "use friendly aliases" back on, the site starts working again.

                      Any idea how to get it to work with "use friendly aliases" turned off?

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