Concrete5.7.5.2 HTTPS - Invalid form token. Please reload this form and submit again.

Permalink
I want to force SSL for my site. It works with putting these 2 lines into .htaccess:
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://mysite.com/$1 [R,L]

But when I login, it gives me this error:

Invalid form token. Please reload this form and submit again.

Without those lines in .htaccess, it works fine, but SSL is not forced.

Is there any other way to force SSL?

Thank you.

linuxoid
View Replies: View Best Answer
linuxoid replied on at Permalink Reply
linuxoid
Anyone?
linuxoid replied on at Permalink Best Answer Reply
linuxoid
I've changed '[R,L]' to '[R=301,L]', logged out - and now SSL works!

1. My .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>

2. Canonical URL is empty
3. URS by SSL is 'https://example.com'
4. Show only canonical URLs is ticked