webmotion Posted June 4, 2014 Share Posted June 4, 2014 I've just started some SEO work on a PrestaShop website. For some reason, the entire site is available on both https and http, which as you can imagine is causing duplicate content issues. http://corsagecreations.co.uk/ https://corsagecreations.co.uk/ Is there any way to resolve this? Ideally only customer and checkout areas should be forced to use https. Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2014 Share Posted June 4, 2014 in preferences > general tab in back office you selected ? Link to comment Share on other sites More sharing options...
webmotion Posted June 5, 2014 Author Share Posted June 5, 2014 Thanks for your reply. We're using version 1.4.5.1 which doesn't seem to have that option included. Is there a manual way to switch this off? Link to comment Share on other sites More sharing options...
webmotion Posted June 5, 2014 Author Share Posted June 5, 2014 I think I *may* have resolved this by taking some code from the latest version. I've edited FrontController.php by replacing the following: $useSSL = $this->ssl; With: if (Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) $this->ssl = true; if (isset($useSSL)) $this->ssl = $useSSL; else $useSSL = $this->ssl; I've also replaced: if ($this->ssl AND !Tools::usingSecureMode() AND Configuration::get('PS_SSL_ENABLED')) { header('HTTP/1.1 301 Moved Permanently'); header('Cache-Control: no-cache'); header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']); exit(); } With: // If we call a SSL controller without SSL or a non SSL controller with SSL, we redirect with the right protocol if (Configuration::get('PS_SSL_ENABLED') && $_SERVER['REQUEST_METHOD'] != 'POST' && $this->ssl != Tools::usingSecureMode()) { header('HTTP/1.1 301 Moved Permanently'); header('Cache-Control: no-cache'); if ($this->ssl) header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']); else header('Location: '.Tools::getShopDomain(true).$_SERVER['REQUEST_URI']); exit(); } Can you see any potential issues there? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now