No panel login with www

Hi there, after inserting the following non-www to www redirect to the .htaccess, I´m not able to log-in to the panel anymore:

RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*)$$1 [R=301,L]

The frontend is working fine. It just keeps reloading the login-page if I try to log in. No error… I didn´t experience this problem with other websites before.

Can u help me?

Thank you

Have you tried setting the URL in your config:

c::set('url', '');

What is your hosting provider?

Maybe you have to add this line between the other two for the http to https redirect.
RewriteCond %{HTTPS} off

Yes! Your the best! Setting the domain did the job for me. The Website is hosted at 1und1(IONOS). Didn´t have to set the Domain with other hosters before…