How to set-up config.php and htaccess
Posted: Sat Feb 17, 2018 3:33 am
Can somebody explain how to set up:
config.php
admin/config.php
.htaccess files
PLEASE
config.php
admin/config.php
.htaccess files
PLEASE
OpenCart Community Forum - Discuss shopping cart and e-commerce solutions.
https://forum.opencart.com/
Code: Select all
# 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 /shop/
Code: Select all
// HTTP
define('HTTP_SERVER', 'https://www.jti.li/shop/admin/');
define('HTTP_CATALOG', 'https://www.jti.li/shop/');
define('HTTP_IMAGE', 'https://jti.li/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'https://www.jti.li/shop/admin/');
define('HTTPS_CATALOG', 'https://www.jti.li/shop/');
define('HTTPS_IMAGE', 'https://jti.li/shop/image/');
Code: Select all
// HTTP
define('HTTP_SERVER', 'https://www.jti.li/shop/');
define('HTTP_IMAGE', 'https://jti.li/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'https://www.jti.li/shop/');
define('HTTPS_IMAGE', 'https://jti.li/shop/image/');
Code: Select all
# SEO URL Settings
RewriteEngine On
RewriteBase /
Code: Select all
RewriteBase /shop/
Code: Select all
#Force (http host) www to non www (optional)
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
#Force (https host) www to non www (optional)
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]