|

Speed Up Your CS-Cart eCommerce Website - Step 2
Posted 17 March 2011 - 01:48 PM #21
I installed smartoptimizer and yes i went from D and C to B to C, yet ..at what price. My store frontend was a wreck, all columns were misplaces, no background, no images, I do not know what happened, it was very weird.
It happened just when I pasted this at the beginning of my .htaccess , as per smartoptimizer instructions:
<IfModule mod_expires.c>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
ExpiresActive On
ExpiresDefault "access plus 10 years"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1
<IfModule mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>
<IfModule !mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1
</IfModule>
</IfModule>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
FileETag none
</FilesMatch>
what went wrong?
Posted 17 March 2011 - 02:07 PM #22
Posted 17 March 2011 - 03:22 PM #23
now, do i have to write again the above code in my root htaccess ? It is when i write that code that the frontpage goes "wacko"
would it help if i write here the content of my root htaccess?
Thanks for your help
Posted 17 March 2011 - 03:24 PM #24
Posted 17 March 2011 - 03:28 PM #25
Posted 17 March 2011 - 04:05 PM #26
Posted 17 March 2011 - 07:22 PM #28

I now have a respectable B (85%) and C (73%) I still have quite a few things to improve:
-Specify image dimensions
-Combine images using CSS sprites
-Combine external JavaScript
-Combine external CSS
-Use efficient CSS selectors
-Specify a Vary: Accept-Encoding header
-Remove unused CSS
-Specify a cache validator
-Minify HTML
-Avoid CSS @import
-Inline small CSS
And that's it. I wonder if there's a magic program that can do all that, lol

Posted 17 March 2011 - 07:56 PM #29
And that's it. I wonder if there's a magic program that can do all that, lol
Hi Precious!

Don't beat your head on the desk or waste your time attempting to implement all of those generic recommendations as they are not all applicable to a database driven ecomm based shopping cart system!
Simply focus on making sure you have Gzip enabled on your site & Smartoptimizer running, these two details will by far give you the biggest returns for your time spent.
And then, when you are able upgrade to 2.1.4 as their have been significant improvements made to the cache system over the last few releases, all improving on page load times of your site.
Here are some nice, clear instructions from Lee Li for implementing & testing for Gzip:
http://forum.cs-cart...&highlight=Gzip
Posted 17 March 2011 - 09:09 PM #30
Yes, I have already seen Lee Li's instructions for gzip and I already have it in my site.
I actually added the piece of code that corresponds to those using smartoptimizer, so that homework has been made

It's good to know I'm not supposed to do ALL that, it is kind of discouraging when you hear you have so many things going wrong in your site.
Struck, you have the gift of cheering me up

Posted 17 March 2011 - 09:26 PM #31
Struck, you have the gift of cheering me up
Awe, thanks Mirni !

Actually, all ladies feel the same way about me as I have a definate ability to make them happy & quite comfortable............

I never waste any of my precious time in attempting to make boys happy, to me it is like "what's the benefit", there is none, other than myself, all other boys are like prehistoric cavemen!

Posted 17 March 2011 - 09:32 PM #32
Actually, all ladies feel the same way about me as I have a definate ability to make them happy & quite comfortable............
![]()
In all modesty

Posted 17 March 2011 - 09:36 PM #33

Posted 17 March 2011 - 09:48 PM #35
Hope all has been going well with you!
Can't talk to you much right now because Mirni gets upset when I talk to other girls!

Posted 22 March 2011 - 11:09 PM #37
As it is the lightest simplest of website I was very confused and checked everything before contacting my host. Finally I had to call them, they checked and told me the problem was in all the changes I made in .htaccess recently.
In apache log I saw the following:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
My hosting company asked me to "optimize" my .htaccess . That's sad, I thought I was making changes to optimize my site and now I have to optimize the changes made

Anyway, I leave here the complete htaccess file so you can advise what to change/remove/ or whatever. I trully appreciate your help, never imagine this would affect my other sites.
DirectoryIndex index.html index.php <IfModule mod_expires.c> <FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$"> ExpiresActive On ExpiresDefault "access plus 10 years" </FilesMatch> </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1 <IfModule mod_expires.c> RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1 </IfModule> <IfModule !mod_expires.c> RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1 </IfModule> </IfModule> <FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$"> FileETag none </FilesMatch> <IfModule mod_deflate.c> <FilesMatch "\.(php|html)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> <IfModule mod_rewrite.c> RewriteEngine on # Some hostings require RewriteBase to be uncommented # Example: # Your store url is http://www.yourcompany.com/store/cart # So "RewriteBase" should be: # RewriteBase /store/cart RewriteBase / RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php?sef_rewrite=1 [L,QSA] RewriteCond %{REQUEST_FILENAME} .*\/catalog\/.* RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME}/index.html !-f RewriteRule . index.php?sef_rewrite=1 [L,QSA] </IfModule>
Before I forget, my host told me that they tried renaming the file, that is, as if it didn't exist and the website is now down began to work, so the issue is in the htaccess file.
Posted 23 March 2011 - 02:43 AM #38
My CSC 2.1.4 PE site is a on a HostGator VPS with PHP 5.3.6 and using SQLite3 for caching. My store is located in /public_html/shop - do I need to modify the SO config.php to account for this location?
thanks,
Glen
Posted 23 March 2011 - 03:00 AM #39
[CS-Cart Optimized Solutions and Server Management]
Posted 23 March 2011 - 03:30 AM #40
Try deleting the .htaccess file in the smartoptimizer directory.. Most people have to
I did that - no luck.