Opencart 2.2.x ssl for all requests

i install the latest version of opencart and i want to enable all ssl for url

In admin set SSL enable

in config.php and admin, and changing the category to https

Htaccess

RewriteEngine On
RewriteBase /

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

but when url is not SEO, it works like this URL with SEO, it doesn’t work URL will be https: //www.localhost/index.php? route = desktop / mac

how to go to https: //www.localhost/desktops/mac

+4
source share
5 answers

, , -. Opencart 2.2 SSL/https, . ( , ). Fastor SEO Pack Pro, vQMOD .

: 1. v2.2.0.x Changes.zip VQMOD 2.6.1 ( ) VQMOD Manager 3.0 ( ). . Google, .

  1. , , xml , site_ssl true , - . , / .

  2. a > > > SSL

  3. .haccess SEO/SSL/WWW ( www , , SSL). seo, haccess:

Blockquote

#SEO URL Settings
RewriteEngine On
#If your opencart installation does not run on the main web folder make    sure you folder it does run in ie. / becomes /shop/

RewriteBase /

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=302]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [QSA]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=302,L]
  1. config.php admin/config.php. http → https

Blockquote

config.php
// HTTP
define('HTTP_SERVER', 'https://www.example.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.example.com/');

admin/config.php

// HTTP
define('HTTP_SERVER', 'https://www.example.com/admin/');
define('HTTP_CATALOG', 'https://www.example.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.example.com/admin/');
define('HTTPS_CATALOG', 'https://www.example.com/');
  1. /temp.

, : / Fix / "" . SSL, , /common/currency.tpl. , .

/CSS : , , v2.2.0 Changes.zip :

Blockquote

SEO/SSL cant load page

Open catalog/controller/startup/startup.php

and after

$this->config->set('config_url', HTTP_SERVER);

add

$this->config->set('config_ssl', HTTPS_SERVER);
+3

opencart 2.2.

https, : (

. 3 :

•• 1 •• .htaccess:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteCond %{REQUEST_URI} store 
RewriteRule ^(.*)$ https://www.__your_domain__.com/store/$1 [R,L]

•• 2 ••

config.php root + admin

<?php
// HTTP
define('HTTP_SERVER', 'https://www.__your_domain__.com/store/');

// HTTPS
define('HTTPS_SERVER', 'https://www.__your_domain__.com/store/');

**** https:// .... , http://.... **** ,


•• 3 •• //url http https voilà:)

public function link($route, $args = '', $secure = false) {
        if ($this->ssl && $secure) {
            $url = 'https://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/index.php?route=' . $route;
        } else {
            $url = 'https://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/index.php?route=' . $route;
        }
+3

? a > a > SSL

+1

, : https , .. - . ssl admin, standard, header.tpl edit-find HTTP https

<meta https-equiv="X-UA-Compatible" content="IE=edge">

, html , http://mywebsite url.

These two things cause an error. As soon as I ftp'dreturned the file to the site, it worked fine in Firefox and IE. I'm a complete newbie to coding, but that was obvious (after breaking a few hairs), so just check your header files and change each HTTPto https. And cross your fingers and toes.

0
source

This means that install opencart whitout vqmod and use this solution, and then install vqmod

-1
source

All Articles