This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Bobo
Bobo

Hello, I have an installation that was working fine but today my client was working in the backend when it suddenly logged them out and when they try to log back in the login page refreshes, throwing no errors. They don't remember when they last actually logged in, when they went to the site today they were already logged in due to having marked it to remember them, then suddenly logged out after a half hour or so.

I don't see any errors in the logs, and the .htaccess had recently been changed a couple days ago with redirects but it was working up until today. I'll paste it here just in case

<IfModule mod_rewrite.c>

    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

  RewriteEngine On

  ##
  ## You may need to uncomment the following line for some hosting environments,
  ## if you have installed to a subdirectory, enter the name here also.
  ##
  RewriteBase /

  ##
  ## Uncomment following lines to force HTTPS.
  ##
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
  RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
  RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301]

  ##
  ## Black listed folders
  ##
  RewriteRule ^bootstrap/.* index.php [L,NC]
  RewriteRule ^config/.* index.php [L,NC]
  RewriteRule ^vendor/.* index.php [L,NC]
  RewriteRule ^storage/cms/.* index.php [L,NC]
  RewriteRule ^storage/logs/.* index.php [L,NC]
  RewriteRule ^storage/framework/.* index.php [L,NC]
  RewriteRule ^storage/temp/protected/.* index.php [L,NC]
  RewriteRule ^storage/app/uploads/protected/.* index.php [L,NC]

  ##
  ## White listed folders
  ##
  RewriteCond %{REQUEST_FILENAME} -f
  RewriteCond %{REQUEST_FILENAME} !/.well-known/*
  RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/.*
  RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.*
  RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.*
  RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*
  RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.*
  RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.*
  RewriteRule !^index.php index.php [L,NC]

  ##
  ## Block all PHP files, except index
  ##
  #
  # Trailing slash check

  # Don't fix direct file links
  RewriteCond %{REQUEST_FILENAME} !-f

  RewriteCond %{REQUEST_URI} !(.*)/$
  RewriteRule ^(.*)$ $1/ [L,R]
  RewriteCond %{REQUEST_FILENAME} \.php$
  RewriteRule !^index.php index.php [L,NC]

  ##
  ## Standard routes
  ##
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]

</IfModule>

EDIT: I dug in more and became afraid this is due to me recently changing the .htaccess so if anyone gets to the site via http://domain.com it always redirects to https://www.domain.com.

I edited the URL config in config/app.php and tried changing the 'linkPolicy' in config/cms.php to "force", which didn't work, now it's on "detect", which still isn't working. I'm pretty stumped.

Thanks for any help!

EDIT: Solved, turns out the way I was forcing a trailing slash was messing up the login page.

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.