Speed Up Your CS-Cart eCommerce Website - Step 2

Hi!



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:







ExpiresActive On

ExpiresDefault “access plus 10 years”







RewriteEngine On



RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(..(js|css))$ smartoptimizer/?$1





RewriteCond %{REQUEST_FILENAME} -f

RewriteRule ^(.
.(js|css|html?|xml|txt))$ smartoptimizer/?$1







RewriteCond %{REQUEST_FILENAME} -f

RewriteRule ^(.*.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1







FileETag none





what went wrong?

you have to delete the .htaccess file in your smartoptimizer folder, at least for most users this solution works

ok, done!!



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

yes I know, just try to paste the smatopt. code in your main .htaccess file again and see if the problem was solved

Forgot to say that if this doesn’t work, you only have one other option, it’s to copy the .htaccess from main file in root directory into smartoptimizer directory. This was the solution that worked for me, but the truth is that most users solved it with the above soltion; to remove it completly.

it seems to be working now, in any case, if you can take a look, I’d appreciate it.

If it is the electro…es yes, todo va perfecto :wink:

Gracias, compatriota :wink:



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 :slight_smile:

[QUOTE]And that’s it. I wonder if there’s a magic program that can do all that, lol [/QUOTE]



Hi Precious! :stuck_out_tongue:



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:

[url]http://forum.cs-cart.com/showthread.php?t=20534&highlight=Gzip[/url]

Thank you, Struck, so good to have you over here.



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 :wink:



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 :stuck_out_tongue:

[QUOTE]Struck, you have the gift of cheering me up :stuck_out_tongue: [/QUOTE]



Awe, thanks Mirni ! :cool:



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



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! :stuck_out_tongue:

[quote name=‘Struck’]

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

[/QUOTE]



In all modesty :smiley:

Well, I just tend to be brutally honest, sugarcoating doesn’t benefit anyone! :smiley:

:shock:

Hi EQ,



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! :eek:

ahahahah, you lover boy :wink:

hello again! I think that all the weirdest things happen to me. I use a VPS and have several sites hosted there, anyway, one of my sites, a simple html with photos was not working.

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 :mad:



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.


```php DirectoryIndex index.html index.php





ExpiresActive On

ExpiresDefault “access plus 10 years”







RewriteEngine On



RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(..(js|css))$ smartoptimizer/?$1





RewriteCond %{REQUEST_FILENAME} -f

RewriteRule ^(.
.(js|css|html?|xml|txt))$ smartoptimizer/?$1







RewriteCond %{REQUEST_FILENAME} -f

RewriteRule ^(.*.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1







FileETag none









SetOutputFilter DEFLATE









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]

```



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.

I’m having trouble getting SO to work. After following the install instructions, my site’s css is missing. I’ve cleared my CS-Cart cache and my browser cache. I’ve set permissions on /smartoptimizer and /smartoptimizer/cache to 0777.



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

Try deleting the .htaccess file in the smartoptimizer directory… Most people have to

[quote name=‘S-Combs’]Try deleting the .htaccess file in the smartoptimizer directory… Most people have to[/QUOTE]



I did that - no luck.