Opencart .htaccess dosyası

anadizin ve admin dizinindeki config.php dosyasında adresleri www olarak değiştirin;

// HTTP
define('HTTP_SERVER', 'http://www.siteadresiniz.com/adminadresiniz/');
define('HTTP_CATALOG', 'http://www.siteadresiniz.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.siteadresiniz.com/adminadresiniz/');
define('HTTPS_CATALOG', 'https://www.siteadresiniz.com/');

daha sonra .htaccess dosyanıza bu satırları ekleyin.

RewriteEngine on

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L,NE]