Speed Up Your CS-Cart eCommerce Website - Step 2

I also deleted the htaccess in smartoptimizer folder, it worked as far as smartoptimizer is concerned, the problem i’m haing now is it’s affecting my other sites, too many redirections.

How can it be fixed?

I had those problems and solved them by copying the .htaccess file from cs cart root to smartoptimizer folder

Is your store in the root or a sub directory? If sub directory then you need to put that in there…


RewriteBase /[COLOR="Red"]sub_directory[/COLOR]
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]

The tool, my store is the root.



E.Qi.Librium, I’ll try to do that and see what happens. Just to have it really clear : you copied exactly what in smartoptimizer folder and left what in root .htaccess.

Just do not want to continue messing up with those files (quiero dejar de meter tanto la pata)

Ok, I will specify:



Copy the content of .htaccess file on your cs cart root (the main .htaccess file)

Paste it on .htaccess from the smartoptimizer folder



Just don’t delete the .htaccess from the root, it’s just to copy it to the smartoptimizer folder, nothing more.



This was how it worked for me, if it doesnt work for you, will not hurt either

yes, I understood that, in fact it’s already done, but I thought something had to change in the main .htaccess file, I mean, my problem is not that smartoptimizer is not working but that main .htaccess just as it is causes my other sites on the same server to be down.

Apparently due to too many redirections.

@sixnin9

Your server might be running suPHP and not liking the 777 permissions you have set on the SO directories. Try changing those to 755 to see if that helps. If still no luck then adjusting its baseDir might be needed.







@mirnitagl

Try removing this from your .htaccess file and see if it now works properly



SetOutputFilter DEFLATE

In my case, this solved my SO problem:

RewriteBase /sub_directory

thanks, Struck!

Struck, 777 or 755 made no difference. I tried also removing the part of code you mentioned, nothing happened.

Then removed smartoptimizer code and everything bagan to work.

The problem is definately smartoptimizer code or part of it.

I removed it and now the other sites are up without problems, I have now just this in my root htaccess:


```php DirectoryIndex index.html index.php



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]







SetOutputFilter DEFLATE





```

mirni, you can try one other solution within smartoptimizer code to see if it works for you, if it doesn’t there will be no consequences either, at least if it works you can keep using smartoptimizer to speed up your site (if you want to off course);



open the config.php file of your smartoptimizer folder and change:



```php //Show error messages if any error occurs (true or false)

$settings[‘debug’] = false; ```



It is now set for “true”, see if turning off the debug function will help

E.Qi.Librium, it seems to be working, thanks! :stuck_out_tongue:

Glad to help :wink:

how can i exclude a folder from caching with smartoptimizer.



The reason is that i have some subdomains/folders in the main public_html which i don’t want to cache because they have css error when caching.

Awesome, thank you very much Lee Li Pop!



Now i get Yslow grade 82 (B)

image sprite are very important. gived me +6 at page speed.

with this and all other lee li pop methods i finally go at 96/89 (at gtmetrix)!! thats pretty good

How can i install smartoptimizer ?

Hello Miracles,


[quote name=‘miracles’]How can i install smartoptimizer ?[/QUOTE]



Please, read the post of NicheBuilder:



[url]http://forum.cs-cart.com/showthread.php?p=63685#post63685[/url]





Lee Li Pop

I tried to install the Smart Optimiser on CS-Cart 2.2.4 I installed SO in the root directory and made the necessary changes to the .htaccess file (even copied the .htaccess in the SO directory). Everything seemed ok, but after testing on the front end when clicking on a product I get a popup with the following error message:



Smart Optimizer Error File Not Found (…/js/jquery.simpletip.1.2.1.js)



Does anyone know why this occurs?



Thank you in advance for your answer.



Edwin

its a problem/conflict with the simpletip jquery .

disable this and try again then you will need to speak to them to see if they have an update for this.



John

Whhere can I disable this. I can only find the tooltip in the core.js.



What needs to be disabled?



// Init history
jQuery.initHistory();

jQuery.initTooltip($('.cm-tooltip:not(:input)'), {});
jQuery.initTooltip($(':input.cm-tooltip'), {position: 'bottom center'});

$('.cm-autocomplete-off').attr('autocomplete', 'off');
return true;
},
initHistory: function()
{
if (typeof(self.inited) == 'undefined' && $.history) {
self.inited = true;

$.history.init(function(hash) {
var self = this;
if(hash != '') {
var parts = hash.split(';');
if (parts[0] != 'ty') {
return false;
}
var rev = parts[1];
var href = parts[2];
var a_elm = $('a[rev=' + rev + ']:first'); // hm, used for callback only, so I think it will work with the first found link
var name = a_elm.attr('name');
if(!self.origContent) {
self.origContent = {
id: rev,
html: $('#' + rev).html()
};
}
jQuery.ajaxRequest(href, {result_ids: rev, caching: true, obj: a_elm, callback: (window['fn_' + name] || {})});
} else if(self.origContent) {
$('#' + self.origContent.id).html(self.origContent.html);
}
}, {unescape: true});
if (location.hash.indexOf('ty;') == 0) {
$.history.load('ty;' + rev + ';' + href);
}

return true;
} else {
return false;
}
},

afterLoad: function(area)
{
return true;
},
processForms: function(elm)
{
var frms = $('form', elm);
// Attach submit handler
frms.bind('submit', function(e) {
return jQuery.dispatchEvent(e);
});