0

I upgraded to EE 2.7.3 a few months back and recently added caching preferences to our .htaccess file for site optimization. Since these changes, I'm currently having two issues:

  • Sometimes when I press the 'Log-out' button, it just refreshes the page and keeps me logged in.
  • After I'm logged out based on time or when the 'Log-out' button does work, when I try to log back in - I will occasionally have the screen loop on a white screen and it won't go to the control panel.

Clearing my cache solves both issues. I don't have a problem doing this, but we're starting to roll the control panel out to others at work and I would rather it just work.

In my 'Security and Session Preferences', I have the CP Session type set to 'Cookies and session ID'.

My .htaccess code is:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 24 hours"
ExpiresByType image/jpg "access plus 1 months"
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType text/javascript "access plus 1 months"
ExpiresByType application/javascript "access plus 1 months"
ExpiresByType application/x-shockwave-flash "access plus 1 months"
ExpiresByType text/css "access plus 1 hours"
</IfModule>

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>

I didn't think this would affect the control panel itself, but I may be wrong.

Do I have to specify I don't want the control panel cached, or does this sound like an issue unrelated to the .htaccess?

2 Answers 2

1

Are you using a multi config environment? If you are, depending on how it's set up it may be looking for www.

I ran into this problem, (couldn't log in) but adding this to the .htaccess fixed it.

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
1

The issue is with the ExpiresDefault. Because it's a catch-all I believe it's setting bad expire headers on the cookies. I was having the same exact issue and removed only that line and all was well!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.