dnt_stp Posted November 13, 2016 Share Posted November 13, 2016 Hi all! Is where a way to keep using https for all users and allow facebook crawler to access http at the same time? Here is a link to shop: https://www.passionforpaintings.com/ Here is a facebook report https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fwww.passionforpaintings.com Link to comment Share on other sites More sharing options...
dnt_stp Posted November 13, 2016 Author Share Posted November 13, 2016 Solved this by creating override on sslRedirection function of FrontController. Here is my code if someone need it: protected function sslRedirection() { // 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() && !preg_match('/.*facebook.*/', $_SERVER['HTTP_USER_AGENT'])) { $this->context->cookie->disallowWriting(); 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(); } } 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