Post by virbaz » Sat Feb 17, 2018 3:33 am

Can somebody explain how to set up:
config.php
admin/config.php
.htaccess files
PLEASE

Newbie

Posts

Joined
Fri Jan 19, 2018 3:58 pm

Post by IP_CAM » Tue Feb 20, 2018 4:24 am

Well, you don't have to set up your config.php.xxxx Files, they will be created automatically
during the OpenCart Installation. Just make sure, that they both are re-named to: config.php
And in your .htaccess.txt file, wich has also to be re-named to .htaccess, you only
have to make sure, that the RewriteBase/ contains the NAME of the Shop Directory, like:
RewriteBase/shop/, if the OC Shop Software is placed in a /shop/... Subdirectory.

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/
But better make yourself smart, and download the free Books from
http://www.isenselabs.com
because you cannot expect others, to play free Teacher about Things,
one can EASY find by help of Google uncounted times. :D
OC is all about Money, always keep this in Mind, either learn, or pay.
Good Luck !
Ernie
---

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by virbaz » Thu Feb 22, 2018 5:04 am

My website sometimes is showing bad symbols instead icons.
It is ok without www. I'm using SSL.
https://my.store (good)
but is bad when:
https://www.my.store
I want to know how to redirect www to without www.
As I read about it I have to change:
config.php
admin/config.php
.htaccess files
Can somebody write any example? Please

Newbie

Posts

Joined
Fri Jan 19, 2018 3:58 pm

Post by IP_CAM » Thu Feb 22, 2018 11:00 am

ADMIN CONFIG.PHP

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/');
ROOT CONFIG.PHP

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/');
.htaccess
AFTER THIS:

Code: Select all

# SEO URL Settings
RewriteEngine On
RewriteBase / 
OR THIS:

Code: Select all

RewriteBase /shop/
depending on your Shop Location and Subname
INSERT THIS:

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]
Good Luck ;)
Ernie
---

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by virbaz » Thu Feb 22, 2018 3:23 pm

Thank you
But still something wrong
www.my.store redirect to https://my.store (ok)
http://my.store no redirection (not good)

Newbie

Posts

Joined
Fri Jan 19, 2018 3:58 pm

Post by IP_CAM » Thu Feb 22, 2018 10:10 pm


My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by virbaz » Fri Feb 23, 2018 3:46 pm

This one do all job, just need to change domain. (.htaccess file)

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

Newbie

Posts

Joined
Fri Jan 19, 2018 3:58 pm
Who is online

Users browsing this forum: Semrush [Bot] and 254 guests