When I change https to http in the url the page displays fine, but when saving or changing page it reverts back to https and loses the css again. The storefront is absolutely fine and works/displays ok.
Background:
I created a store for a client on their domain, which has an SSL certificate and works perfectly.
The client now wants a second site with the same products and settings as the first site, with different branding and design.
I have created a domain reference on a different server and:
- installed a clean version of opencart 2.2 (same as original site)
- created a new database
- run the install successfully and deleted the install folder
- Everything worked fine
- created a backup of the original site with backup pro, turning off SSL in the settings
- uploaded the tgz file to the new domain reference and unpacked it.
- The duplicate store front worked fine after fix to the seo urls in htaccess
- The admin however was broken, no css and buttons not appearing, just a text list of the admin menu.
Both config files have http throughout (no mention of https anywhere) and htaccess all http.
Once the new site is ready to go live I'll purchase SSL for it, as currently the domain it will become is live with an ssl cert for this domain already, and not yet transferred over to the new host.
HTACCESS SETTINGS:
Code: Select all
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directory listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
#RewriteBase /
RewriteBase /mydomain.co.uk/
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/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]
#force use of www to enable system images to work
RewriteCond %{HTTP_HOST} ^00.000.00.000/mydomain.co.uk/R=301,NC]
RewriteRule ^(.*)$ http://00.000.00.000/mydomain.co.uk/$1 [L,R=301,NC]
CONFIG:
// HTTP
define('HTTP_SERVER', 'http://00.000.00.000/mydomain.co.uk/');
// HTTPS
define('HTTPS_SERVER', 'http://00.000.00.000/mydomain.co.uk/');
ADMIN CONFIG:
// HTTP
define('HTTP_SERVER', 'http://00.000.00.000/mydomain.co.uk/admin/');
define('HTTP_CATALOG', 'http://00.000.00.000/mydomain.co.uk/');
// HTTPS
define('HTTPS_SERVER', 'http://00.000.00.000/mydomain.co.uk/admin/');
define('HTTPS_CATALOG', 'http://00.000.00.000/mydomain.co.uk/');
Many thanks
John