Jump to content
  • 0

How To Force Ssl?


racetoni2

Question

Recommended Posts

  • 0

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;

}

Link to comment
Share on other sites

  • 0

 

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:^_^

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...