We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18270
    • 68 Posts
    Strange issue I've been having using MODX Revolution 2.1.3-pl (traditional) with the Login snippet (may not be related just to this version of ModX).

    WITH IE ONLY... If logging into http://mysite.com/ via the login snippet (on the public side of the site, not the manager), closing IE, opening IE but this time at http://www.mysite.com/ I can no longer login at all, in fact it doesnt throw me any sort of error message at all. Only thing I can do is manually empty IE cookies, history etc to allow me to log back in.

    I'm assuming there is some issue where IE is looking for a cookie on the wrong address and getting confused.

    Does anyone know if this is an issue related to IE or ModX 2.1.3? Must we ensure that htaccess redirect to just one primary address so IE doesnt get confused? Any ideas?

    It seems to fix the issue if I force the website to redirect to ONE primary address (in this case the www.mysite.com address), but I need to fully understand this issue for the future.

    kind regards

    Marcus
    • This could indeed be browser based... there are problems for example with the <base> tag behaving differently on different browsers.

      Re the sessions: yes, those are absolutely related to the url (www vs. http:// vs. https://), and login is one place where that can crop up. I'd recommend forcing the connection to be one or the other via the .htaccess file. Are you already doing that?
      • Magnatron [Maarten Wolzak] Reply #3, 11 years, 10 months ago
        I have the same experience with IE.
        Suggested solution (one primary address with .htaccess) works great.

        I added the following to the .htaccess file, right after the line with "RewriteEngine On":

        RewriteCond %{HTTP_HOST} !^www\.
        RewriteRule ^(.*)$ http://www\.%{HTTP_HOST}/$1 [R=301,L]
        • Magnatron [Maarten Wolzak] Reply #4, 11 years, 10 months ago
          I have the same experience with IE.
          Suggested solution (one primary address with .htaccess) works great.

          I added the following to the .htaccess file, right after the line with "RewriteEngine On":

          RewriteCond %{HTTP_HOST} !^www\.
          RewriteRule ^(.*)$ http://www\.%{HTTP_HOST}/$1 [R=301,L]
            • 18270
            • 68 Posts
            So does this sound liek a bug or some sort then? What if you wanted to have the same site run from multiple addresses (without forcing a redirect). It seems a bit wrong that you cant do that (although generally it is desirable to force redirect to one primary address).
              • 32025
              • 305 Posts
              I am having the same issue with ie not allowing me to log-in. I tried to add the code above from Magnatron right between "Rewrite Engine On" and "RewriteBase /" but my site would not show. Here is my .htaccess rules that are showing:

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


              Everything else had a # in front of. I also have search engine friendly URLs enabled as you can see.

              Can someone please let me know what to put in my .htaccess file, so that I can log-in whether or not I have the www. in Internet Explorer? It would be nice for my non tech clients.
                Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
              • The www vs. non-www versions are in the sample .htaccess file that ships with MODx:

                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
                #
                #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]
                
                
                # The Friendly URLs part
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
                


                Uncomment the block you need.

                Also, to be clear: just because you've modified your .htaccess file does NOT mean you have friendly URLs enabled. It just means that your server is able to handle friendly URLS if and when you enable that system setting in the MODX manager.
                  • 28120
                  • 380 Posts