We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22377 ☆ A M B ☆
    • 33 Posts
    Have a big problem with one of my MODx installations.

    Problem: site works perfectly in all browsers i tested in (FF windiws and Mac, IE7, Opera, Safari) with one exception: on IE 6, when I try to access the site I get a 404 page instead.
    Strange part: mind you, the page appears for about 1 second, and is looking perfect, but after 1 second it disappears and is replaced with the 404 message.
    This only happens on IE 6.

    I’ve traced the problem to the .htaccess, specifically to the rewrite rule:
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    if i remove the above rule from .htaccess, the website loads in IE6, but of course the menus don’t work because the friendly URLs are disabled.

    Host has PHP 5.2.5 running on Apache/2.2.9. Let me know if you need the server configuration posted here.

    MODx is configured with:
    Friendly URLs: on
    Use friendly aliases: on
    Use friendly alias path: on
    Allow duplicate aliases: yes

    I tried changing the settings, turning friendly alias path and duplicate aliases off , but it didn’t make any difference.
    I have both .htaccess files in place and configured properly (i’ve used friendly URLs on all my previous installations and it always worked great).

    I really need some help with this, turning off the friendly URLs is not really an option for me.

    Thanks in advance!

    here is my .htaccess file:
    # 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. If you have
    # problems with your .htaccess working at all, try un-commenting the first 
    # line above the "RewriteEngine On" directive.
    #
    # 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]
    
    #Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /
    
    
    
    # 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 THE ABOVE AND BELOW <<<
    #
    #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 but 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
      • 22377 ☆ A M B ☆
      • 33 Posts
      Problem was with this bit of code, copied from the default modx minimal template:
      <!--[if lte IE 6]>
        <style type="text/css" media="screen, tv, projection">
              body { behavior: url(assets/js/csshover.htc); } /* hover:anything support */
              #content { margin-left: 22px; } /* to avoid the BMH */
              a,  a:link { border-bottom-style: solid } /* becuase IE just doesn't dot */
        </style>

      That is a bit of bug-fixing code that’s featured in the default MODx template, i just copy-pasted from that to my own template (as i did, many times before).

      So i missed the
      body { behavior: url(assets/js/csshover.htc); } /* hover:anything support */
      part, which was referencing a .htc file that wasn’t there, because the file was actually named [b]csshover2.htc[/b]
      This caused that nasty bug with IE 6 where if it doesn’t find a referenced .htc file it puts a 404 header on the whole page.

      Now, thing is, i’ve done this many times, and this never happened, because the file in /assets/js/ was named csshover.htc not csshover2.htc.

      As far as i see it, this is a major problem with the MODx install package. I checked:

      - in the MODx install kit (downloaded from the website) the file is named csshover2.htc
      - in the minimal template of the MODx installation (the one you see right after you just deployed MODx) the code reads "url(assets/js/csshover.htc)" - without the "2";
      This means (have to test it to be 100% sure):

      a default MODx installation, right out of the box, will not work when viewed in IE 6 !!

      and also the "hover anything" fix will not work either.

      I intend to double-check this.
      Moderators please move this thread to the bugs section. This issue if it is still present must be fixed ASAP, by either renaming the file in the MODx installation package, or correcting the .htc reference in the default template.

      EDIT: I downloaded the MODx install package, did a fresh install and verified all the above, they all confirm. This bug needs to be fixed right away!
        • 25663 MODX Staff
        • 12,272 Posts
        Please file this as a bug using the Bug reports link in the header of the forum. Thanks for the research. smiley
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 22377 ☆ A M B ☆
          • 33 Posts
          Filed a bug report. You’re very welcome wink
            • 3749
            • 24,544 Posts
            Thanks again for all your work on this. smiley
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 4018
              • 1,131 Posts
              On another note, why worry about IE6? Considering the number of people who are dropping IE6 support, I wouldn’t be too terribly concerned about IE6 unless there’s a specific reason for it. IE6 is an 8+ year old browser. Anyone still using it should be shot. There’s no reason not to upgrade to IE7...none whatsoever.

              37 Signals has dropped support of IE6 from their sites (Basecamp, Backpack, etc.). Apple’s MobileMe doesn’t support it. iStockPhoto.com has dropped support. Even Google has recommended dropping support of IE6.

              The main reason for this is due to the fact that IE6 simply can’t do a lot of the things that modern web applications are capable of. There are workarounds of course, but the amount time and energy required to get them to work in IE6 doesn’t equal the payoff. There’s just no real benefit there.

              Granted, it depends on the audience of the site you’re building on whether you can drop support of IE6. But in most cases you can. One of the easiest ways of doing this is to simply nudge visitors and let them know they need to upgrade. One script that does just that is Pushup (http://www.pushuptheweb.com). I’ve used it on a few sites and it works quite well. Very subtle way of hinting at the need for upgrading.

              Think of it like this. Ask yourself a question: How much time do I invest in testing and debugging for compatibility with IE6? Then ask yourself: How many IE6 users will be visiting this site? If the number is relatively small and you’re investing quite a bit of time towards testing with IE6 then you should consider dropping support of it. It’s all about weighing the cost and benefits of supporting a browser that is quickly becoming insignificant.

              In my opinion, the default MODx template is just a demo. It’s targeted towards developers and isn’t really meant to be used as the basis for a full blown website. It’s just an example of how MODx could be used. The chances of anyone viewing that template specifically with IE6 are slim. So why even bother with worrying about whether it works right or not with IE6?

              Just my two-cents. wink
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                • 7253
                • 97 Posts
                I agree with Bravado, except for the fact that this is a tiny change to fix a broken link in the demo template. The fact that this fixes things in IE6 is kinda a side issue.
                  • 25663 MODX Staff
                  • 12,272 Posts
                  As much as I can’t stand IE6, I’m also still a realist. Even on the MODx site which is heavily geek oriented we have an appreciable amount of IE6 traffic. It’s not about the percentage of IE6 traffic for me, it’s about who’s behind those dwindling percents. Any site that is marketing online to a general broad audience would be crazy to drop IE6 support at this point. 2010 is a different year and I bet we finally see it relegated to the banishment bin.

                  Point of clarification: 37signals didn’t drop IE6 support either, they’re just not purposefully testing and fixing little things there. Their products are still usable in IE6, but they won’t guarantee that to be true in the future. (And they might be borked in spots now for all I know.)

                  Ah but in an ideal world we’d also have congressional leaders that didn’t load the "stimulus" bill with pork, too.


                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me