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

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

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

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

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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...