Jump to content
  • 0

Question

Recommended Posts

  • 0
Posted

Well done mate never heard of HTTP:X-Forwarded-Proto before.

I read it somewhere in stackoverflow, but did not try it. Was looking also how to redirect all requests to https.

  • 0
Posted

I read it somewhere in stackoverflow, but did not try it. Was looking also how to redirect all requests to https.

 

Are you using a proxy server / load balancer?

  • 0
Posted

Are you using a proxy server / load balancer?

No. Why? I actually got mine working.

All requests are redirected to https:// www. my-domain .tld

  • 0
Posted

No. Why? I actually got mine working.

All requests are redirected to https:// www. my-domain .tld

 

Sounded like you may be based on the header.. but that's alright, if it's working, great!  :blesta:

  • 0
Posted

How can i force blesta to use SSL?

 

Hi mate,

 

I do this using the web server only but have to make sure that Blesta is never configured to handle it (otherwise redirect looping occurs). All order pages have Force Secure Connection (HTTPS) un-checked.

 

For those that are using nginx:

#catch all http 80 and redirect to https 443
server {

      listen 80;
      return 301 https://$host$request_uri;

}

  • 0
Posted

 

Hi mate,

 

I do this using the web server only but have to make sure that Blesta is never configured to handle it (otherwise redirect looping occurs). All order pages have Force Secure Connection (HTTPS) un-checked.

 

For those that are using nginx:

#catch all http 80 and redirect to https 443
server {

      listen 80;
      return 301 https://$host$request_uri;

}

Most resellers have no access to root. So the easiest way is .htaccess :blesta:^_^

  • 0
Posted

And I did not use the internal .htaccess for this: in other words, I left those two lines commented:  :rolleyes:

I then added this immediately after RewriteEngine on


#First rewrite any request to the wrong domain to use the correct one (here www.)
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
#Now, rewrite to HTTPS:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
****This redirects all requests to https://www, if you want you can modify it. :P

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...