Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: hatmak on October 12, 2024, 06:51:04 AM

Title: Token verification failed. Please go back and try again.
Post by: hatmak on October 12, 2024, 06:51:04 AM
Hi, I get this error when I try to log in to my site. I can log in on the second try. Does anyone have any ideas on how I can solve this?
Title: Re: Token verification failed. Please go back and try again.
Post by: Aleksi "Lex" Kilpinen on October 12, 2024, 06:54:50 AM
Can't really say for sure based only on that, but are you entering the forum using the same address your forum is configured for? For example, accessing the forum from www and the forum expecting no www will not work, and the same is true for the reverse, and similar differences like http/https. To avoid issues like this, redirect all traffic to the correct address on the server level.
Title: Re: Token verification failed. Please go back and try again.
Post by: hatmak on October 12, 2024, 07:24:26 AM
Quote from: Aleksi "Lex" Kilpinen on October 12, 2024, 06:54:50 AMCan't really say for sure based only on that, but are you entering the forum using the same address your forum is configured for? For example, accessing the forum from www and the forum expecting no www will not work, and the same is true for the reverse, and similar differences like http/https. To avoid issues like this, redirect all traffic to the correct address on the server level.

Yes, I'm sure I'm using the correct address.
Title: Re: Token verification failed. Please go back and try again.
Post by: Sir Osis of Liver on October 12, 2024, 06:07:25 PM

.htaccess -


# 301 REDIRECT HTTP TO HTTPS AND WWW TO NON-WWW
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
</IfModule>