Page 1 of 2

Forcing HTTPS not possible on Bludit?

Posted: Tue Mar 14, 2017 12:28 pm
by franckfriends
Hi

I'm trying to force HTTPS on a Bludit site with the edition of the htaccess but only on the Bludit site I get a "redirected you too many times" error.

Even a PHP solution gave the same result.

Is there a solution to force HTTPS on a Bludit site without causing endless redirections?

Thanks!

Re: Forcing HTTPS not possible on Bludit?

Posted: Tue Mar 14, 2017 1:03 pm
by Edi
Can you please post your .htaccess.

Re: Forcing HTTPS not possible on Bludit?

Posted: Tue Mar 14, 2017 2:32 pm
by diego
Hi, have you on settings the URL base with the https:// ?

Re: Forcing HTTPS not possible on Bludit?

Posted: Tue Mar 14, 2017 2:52 pm
by franckfriends
Edi wrote:Can you please post your .htaccess.
Hi Edi,

My htaccess is the one generated by Bludit by default.

Code: Select all

AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>

# Enable rewrite rules
RewriteEngine on

# Deny direct access to .txt files
RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L]

# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]

_________ <- here i've inserted many rules found on the Internet but with no success

</IfModule>
I've tried the rules found here :
https://help.directadmin.com/item.php?id=624
and here :
http://stackoverflow.com/questions/4398 ... od-rewrite

Whatever I try it fails :(

Re: Forcing HTTPS not possible on Bludit?

Posted: Tue Mar 14, 2017 2:54 pm
by franckfriends
diego wrote:Hi, have you on settings the URL base with the https:// ?
Yep, that's the first thing I did (in the administration interface) but with no success :(

Re: Forcing HTTPS not possible on Bludit?

Posted: Wed Mar 15, 2017 12:13 am
by Edi
franckfriends wrote: Whatever I try it fails :(
I will play around with it. In my hosting I can force to https as option when installing a certificate. ;-)

Re: Forcing HTTPS not possible on Bludit?

Posted: Wed Mar 15, 2017 5:37 am
by franckfriends
Edi wrote: I will play around with it. In my hosting I can force to https as option when installing a certificate. ;-)
Hi Edi,
From the info I've gathered so far, our host doesn't allow such an option (something to do with load balancer etc.).
Basically, we don't have such a flexibility.

So, what you mean is that there is no solution available via the .htaccess file edition, right?

Thanks again!

Re: Forcing HTTPS not possible on Bludit?

Posted: Wed Mar 15, 2017 1:38 pm
by Edi
Try to add the following to .htaccess:

Code: Select all

RewriteCond %{HTTP_HOST} ^mydomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$
RewriteCond %{HTTPS} =off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]
The .htaccess then will be:

Code: Select all

AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>

# Enable rewrite rules
RewriteEngine on

RewriteCond %{HTTP_HOST} ^mydomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$
RewriteCond %{HTTPS} =off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]

# Deny direct access to .txt files
RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L]

# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]

</IfModule>

Re: Forcing HTTPS not possible on Bludit?

Posted: Thu Mar 16, 2017 5:50 am
by franckfriends
Hi Edi

Thanks a lot for your help.

After some more testing it appears that the problem we are encountering has nothing to do with Bludit and the way it works.

Sorry for having wasted your time. :|

Re: Forcing HTTPS not possible on Bludit?

Posted: Thu Mar 16, 2017 1:42 pm
by Edi
No problem...

Does it work now?