but when you read the post you can note that when force ssl is active, the directory name where dolibarr is installed isautomatically duplicated in the URL
That´s the problem, as that URL does not exists at all. https://mydomain/erp/erp main reason why I ask for some help, maybe nobody is using ssl or maybe is my dolibarr only, I´ll never know if nobody answer this post.
Believe me, I’ve tried everything, so after many trials wrote the problem here, hoping for some help.
I hope someone can make that change in their own conf.php and tell me if it happens the same, then it would clearly be a bug and not a problem in my Dolibarr and I would be a little happier and wait for a fix from the masters.
Problems here too. I don’t even get an error, simply a redirect loop if I enable that option. I only can use SSL if I explicitly add https:// prefix (which I actually use). Quite weird. Maybe with an .htaccess rule could it be done too
Hi planpc,
try edit file main.inc.php find below code
// $_SERVER["HTTPS"] is 'on' when link is https, otherwise $_SERVER["HTTPS"] is empty or 'off'
if (empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on') // If link is http
{
$newurl=preg_replace('/^http:/i','https:',DOL_MAIN_URL_ROOT).$_SERVER["REQUEST_URI"];
}
and change wihte this
// $_SERVER["HTTPS"] is 'on' when link is https, otherwise $_SERVER["HTTPS"] is empty or 'off'
if (empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on') // If link is http
{
$newurl=preg_replace('/^http:/i','https:',DOL_MAIN_URL_ROOT).$_SERVER["REQUEST_URI"]["L,R=301"];
}
I have the same problem as you but the solution provided doesn’t work for me.
In your conf file, for the parameter $dolibarr_main_url_root, do you have
“http://www.mydomain.com/erp” or “erp” pr “mydomain.com” or “httpS://www.mydomain.com/erp”?
I Installed dolibarr on a sub domain (erp.mydomain.com) and in my conf file, I used this value and I have the same problem, https doesn’t work at all
Before installed to that subdomain, does your dolibarr has been working on a domain or is a sub domain installation from scratch?
In my case is not a sub domain, so dont think my conf.php file could help you much more that the one included in dolibarr before installation, instead, if you publish which are the values in yours, maybe someone can help you find the right way.
I suppose in yours, must be the same with: