Jump to content

How to setup an existing Prestashop 1.6 shop for cookie-free domains


papagino

Recommended Posts

Hi, I have an existing shop using PrestaShop version 1.6.1.24 and trying to raise my GTmetrix Performance in order to improve my site ranking and speed by serving my static content from a cookieless domain... I have followed the guide here: https://www.sunnytoo.com/18375/add-media-servers-prestashop-1-7-prestashop1-6  and other guides online but I am having troubles.

My site is being hosted by JustHost on a shared server, with Dedicated IP and SSL on all pages.

- I have setup a "static" subdomain on my host and configured it to redirect to my main domain (https://www.mydomain.com).

- I then added this subdomain (static.mydomain.com) to Media server #1 in the Performance section of my BO.

- Did a regenerate of the .htaccess file  (deactivate the "Friendly URL" option and save it, then activate the "friendly URL" option and save it again).

- Copied css, images, img, js, logo, modules and themes folders to the newly created static folder on my host.

Now, when I am looking at my webpage, the content is all over the page like below:

Bad.thumb.png.acae6fa18be50f4b8e1fec2d51b68307.png

 

So, I really need to know what I am doing wrong or what other files/folders should I copy to my static folder in order to fix this problem.

In other words, what other "'Static content" files/folders should I copy to my "static" folder or what other steps am I not doing.

Please be very specific.

Thank you for your help.

Dan

 

 

 

Edited by papagino (see edit history)
Link to comment
Share on other sites

Ok, I found the problem, when I created the subdomain, it was under Document Root /public_html/static instead of just /public_html.

However, only my product images are served via the subdomain and my GTmetrix still have a "F" for most of my pages.

I also noticed that the subdomain that I have created on my Host now has  "http://static.mydomain.com/%{ENV:REWRITEBASE}img/c/$1$2.jpg"  as a value for Redirection, probably created with the updated .htaccess file. My site have a lot of .png images also, and these are not served via the subdomain. How can I have them also served via the subdomain?

Do I have to modify the .htaccess file, probably at the section under "# Images" to also include .png images to be served via the subdomain?

Any recommendation would be appreciated.

Cheers

Dan

 

 

 

 

Edited by papagino (see edit history)
Link to comment
Share on other sites

Ok, when looking in GTmetrix, YSlow "Use cookie-free domains" section, I notice that all components listed are from 3rd parties modules:

- Canada Post Shipping v1.3.3 - by Presto-Changeo

- Creative Slider v6.6.7 - by WebshopWorks

- HTML Box Pro v3.1.6 - by MyPresta.eu

- PrestaBlog v3.7.4 - by HDClic

- Product, Shop Reviews, Reminder, Profile, Rich Snippets v1.5.7 - by mitrocops

 

Is there something that I can add to the .htaccess file to Unset cookies for all images, js, css etc file using htaccess rule?

Or, any other ways to fix this problem...

Thank you for your help.

Dan

 

 

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...