WebsiteBaker Community Forum

WebsiteBaker Support (2.10.x) => General Help & Support => Topic started by: ivankeud on January 23, 2018, 05:55:40 PM

Title: Back end in https ?
Post by: ivankeud on January 23, 2018, 05:55:40 PM
Hello all,

I am a loyal user of WebsiteBaker for 10 years and I did and still do a lot of websites with ( examples : http://www.ivan-reynier.com/webdesigner/creation-site-web.php (http://www.ivan-reynier.com/webdesigner/creation-site-web.php) )
My question is how to configure the back office in https ?
When I try to connect to the back office, I have a 404 error...

The frontend works well in https

My htaccess file :
Quote
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

I use also the droplet [[securelink?path=/]]
Quote
if(!isset($path)) return true;
$linkfind = WB_URL.$path;
$linkreplace = str_replace("http://","https://",$linkfind);
$wb_page_data = str_replace($linkfind, $linkreplace, $wb_page_data);
if ($_SERVER['SERVER_PORT']!==80) {
    $linkfind = WB_URL.MEDIA_DIRECT ORY;
    $linkreplace = str_replace("http://","https://",$linkfind);
    $wb_page_data = str_replace($linkfind, $linkreplace, $wb_page_data);
    $linkfind = WB_URL.'/modules';
    $linkreplace = str_replace("http://","https://",$linkfind);
    $wb_page_data = str_replace($linkfind, $linkreplace, $wb_page_data);
    $linkfind = TEMPLATE_DIR;
    $linkreplace = str_replace("http://","https://",$linkfind);
    $wb_page_data = str_replace($linkfind, $linkreplace, $wb_page_data);
}
return true;

I use Wb 2.10.0 with PHP 7

any idea ?

Thank you
Title: Re: Back end in https ?
Post by: dbs on January 23, 2018, 06:00:11 PM
Hi, in your config.php is the https also needed.
Title: Re: Back end in https ?
Post by: ivankeud on January 24, 2018, 09:01:37 AM
Ok great, it works  (Y)
Thank you
Title: Re: Back end in https ?
Post by: Gast on January 24, 2018, 05:58:01 PM
to say it a little bit clearer....

if you have a signed certificate for SSL, it's not needed to have a .htaccess or code like your's to have a re-direct to a https-page in back-or frontend

if the ssl-usage is enabled in your server-settings, you have to change only the WB_URL in your config.php in wb-root-folder

if you use a older WB-Version or in your content extern links, maybe to Pictures etc on foreign servers, you have to check them. if there is a non-https-adress somewhere in your content in use, you get a warning in your browser adress for a "unsecure" page

Title: Re: Back end in https ?
Post by: ivankeud on January 25, 2018, 09:36:33 AM
Thank you for these clarifications...