Jump to content
  • 0

Question

Recommended Posts

  • 1
Posted

The .htaccess file included with Blesta already contains a rule to force HTTPS, which is commented out by default. Simply remove the # symbol at the beginning of these lines

# Force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]

i.e.

# Force HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]
  • 0
Posted
  On 10/1/2015 at 8:34 PM, racetoni2 said:

OK, So i try that already. I open the. htaccess file. It was blank. So i added the wholes entire lines in there and is not forcing SSL.

 

Do you have teamviewer and I can look with you or are you using a control panel (If you use a non control panel do you have allowoveride All?)

  • 0
Posted

Here is the apache config. Mod rewrite enbled:

 

<VirtualHost my.netstreet.co.za:443>

     SSLEngine On

     SSLCertificateFile /etc/apache2/ssl/*.netstreet.co.za.crt

     SSLCertificateKeyFile /etc/apache2/ssl/*.netstreet.co.za.key

     SSLCACertificateFile /etc/apache2/ssl/geotrust.cer

 

     ServerName my.netstreet.co.za

     DocumentRoot "/var/www/Netstreet/my"

     ErrorLog ${APACHE_LOG_DIR}/error.log

 

<Directory "/var/www/Netstreet/my">

    Options Indexes FollowSymLinks

    AllowOverride All

    Order allow,deny

    Allow from all

</Directory>

</VirtualHost>

  • 0
Posted
  On 10/2/2015 at 10:42 PM, murendie said:

Here is the apache config. Mod rewrite enbled:

 

<VirtualHost my.netstreet.co.za:443>

     SSLEngine On

     SSLCertificateFile /etc/apache2/ssl/*.netstreet.co.za.crt

     SSLCertificateKeyFile /etc/apache2/ssl/*.netstreet.co.za.key

     SSLCACertificateFile /etc/apache2/ssl/geotrust.cer

 

     ServerName my.netstreet.co.za

     DocumentRoot "/var/www/Netstreet/my"

     ErrorLog ${APACHE_LOG_DIR}/error.log

 

<Directory "/var/www/Netstreet/my">

    Options Indexes FollowSymLinks

    AllowOverride All

    Order allow,deny

    Allow from all

</Directory>

</VirtualHost>

 

not enabled on the http.d configuration.

  • 0
Posted
  On 10/25/2015 at 6:39 PM, racetoni2 said:

I get the following error now:  This webpage has a redirect loop

ERR_TOO_Many _REDIRECTS

 

can you please paste your .htaccess code here, and are you using HTST or Mod_Spdy? 

  • 0
Posted
i believe mod_spdy

 

 

########################################################

# package:    minPHP

# filename:   .htaccess

########################################################

 

<Files ~ "\.(pdt)$">

   order deny,allow

   deny from all

</Files>

 

# Protect against Clickjacking

#Header append X-Frame-Options "SAMEORIGIN"

 

RewriteEngine on

 

# Force HTTPS

#RewriteCond %{HTTPS} !=on

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]

 

RewriteCond %{REQUEST_FILENAME} !-d

 

RewriteCond %{REQUEST_FILENAME} !-f

 

 

RewriteRule ^(.*)$ index.php

 

 

 

RewriteCond %{REQUEST_URI} ^(.*)/install.php$

 

RewriteRule install.php %1/install/ [R=301,L]

  • 0
Posted
  On 10/25/2015 at 7:00 PM, racetoni2 said:

Did that already and still getting the same error

ok comment them both out and try your blesta, try it with http:// see if it redirects to https:// if so you are using HTST

 

If it fails try:

RewriteEngine   On
RewriteCond     %{HTTPS}        off
RewriteCond     %{SERVER_PORT}  ^80$ [NC]
RewriteRule     (.*)    https://%{HTTP_HOST}%{REQUEST_URI}

If that fails try:

RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com [NC]
RewriteCond %{REQUEST_URI} ^/ [NC]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L]

replacing domain.com with whatever your blesta is e.g.:

RewriteCond %{HTTP_HOST} ^(www\.)?licensecart\.com/billing/ [NC]
RewriteCond %{REQUEST_URI} !^/dl.php [NC]
RewriteCond %{REQUEST_URI} ^/ [NC]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://licensecart.com/billing/$1 [R=301,L]

If it's none of them I'm out of ideas.

  • 0
Posted
  On 10/25/2015 at 8:28 PM, racetoni2 said:

 

I have solve the PROBLEM>>>>>> OMG!!!!!!!

Ok I took out the old code and replace it with the following:

 

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

 

 

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

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.

×
×
  • Create New...