Jump to content

Is this right?


Mr S

Recommended Posts

hi just wanted to see if my code is correct. I need a 301 redirect for all requests unless it's a page that need to be Secure (HTTPS) such as authentication, Contact Form, shopping cart (Google found a SSL back link to our site some how no alot of product page have been indexed) [bad Google, bad Dog lol]

 

Should I be worried about JS, CSS & Img files being redirected because of my edit?

 

 

V1.4.6.2

file: classes/FrontController.php

 

.......

 if ($this->ssl AND !Tools::usingSecureMode() AND Configuration::get('PS_SSL_ENABLED'))
 {
  header('HTTP/1.1 301 Moved Permanently');
  header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']);
  exit();
 }
 else if (Configuration::get('PS_SSL_ENABLED') AND Tools::usingSecureMode() AND !($this->ssl))
 {
  header('HTTP/1.1 301 Moved Permanently');
  header('Location: '.Tools::getShopDomain(true).$_SERVER['REQUEST_URI']);
  exit();
 }
 ob_start();

.......

 

Thanks

Link to comment
Share on other sites

js and css will not invoke the FrontController class, so you should be ok there.

 

have you created a robots file and submitted it to google webmaster tool site? inside the webmasters site, you can instruct google so that it does not index various pages of your site

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...