You are right this is a paid feature. And it cannot turned off with .htaccess.
As a workaround you can manually modify the file site.php in the directory /bl-content/databases.
You are right this is a paid feature. And it cannot turned off with .htaccess.
Code: Select all
<?php
// protocol : http ou https ?
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') $urlBrowser = "https://"; else $urlBrowser = "http://";
// host (domain name or ip adress)
$urlBrowser .= $_SERVER['HTTP_HOST'];
// ressource
$urlBrowser .= $_SERVER['REQUEST_URI'];
//display url of browser if you need
//echo $urlBrowser;
//possible redirects for
//http->https
//www -> non www
//for me : sometimes url will look like https://www.mysite.com/blog I want to redirect to https://mysite.com/blog
$findme = '://www.';
$pos = strpos($urlBrowser, $findme);
if ($pos !== false) {
//found need to redirect
$urlBrowserNew = str_replace("://www.","://",$urlBrowser);
//echo "I need to redirect to $urlBrowserNew";
header("Status: 301 Moved Permanently");
header('Location: '.$urlBrowserNew);
}
$findme = 'http://';
$pos = strpos($urlBrowser, $findme);
if ($pos !== false) {
//found need to redirect
$urlBrowserNew = str_replace("http://","https://",$urlBrowser);
//echo "I need to redirect to $urlBrowserNew";
header("Status: 301 Moved Permanently");
header('Location: '.$urlBrowserNew);
}
?>
<!doctype html>
<html lang="<?php echo Theme::lang() ?>">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">