WebsiteBaker Support (2.12.x) > General Help & Support

can not login after switching to SSL

(1/1)

netraam:
Hello,

Our hosting company has set SSL on our website. They warned me that it was possible that I have to change something in the CMS. But now I can't login anymore. Does someone know how I can solve this problem.

thanks,
Maarten

johnbroeckaert:
Hello,

try to go to the root of your website with FTP software and change the config file

--- Code: ---define('WB_URL', 'http://localhost:4001/wbdemo'); // no trailing slash or backslash!!
--- End code ---
into

--- Code: ---define('WB_URL', 'https://localhost:4001/wbdemo'); // no trailing slash or backslash!!
--- End code ---
That would do it....

johnbroeckaert:
You can force an HTTPS connection on your website by adding these rules in your website's .htaccess file:
   

--- Code: ---RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
--- End code ---

The .htaccess file needs to be located inside the site's document root folder. If your website is in a sub folder, then the .htaccess should be placed in the corresponding sub folder.

You can create or edit the .htaccess file either via FTP, or using with the File Manager available in cPanel.

netraam:
thanks for the fast reply,

the url in the config.php was already https.
I've put the rules in the htaccess and now everything works fine.

When changing the htacces I've accedentaly deleted the content of the htaccess.
Are there other things that need to be in the .htaccess? Now I have only the three lines that you posted.

johnbroeckaert:
that depends on what was arranged. For example 404 error or 302 references from old to new pages;
This is useful for recording as standard:

--- Code: ---ErrorDocument 404 http://www.domain.com/index.php
--- End code ---
where domain.com is your own domain.

Navigation

[0] Message Index

Go to full version