All in one solution for Gzip, Minify, Emebed, Concatenate

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Fri Nov 14, 2008 6:00 pm

Hi all

Here's the best way ever for doing that with joomla (no matter 1.0.x or 1.5.x)

And I've tested a LOT of others boring solutions before this one.

Got a 81 score with YSlow (if no flash banners are on the home at the moment)

So this is very simple:

-Download the archive (1.6beta)
-Unzip
-Upload the "smartoptimizer" in your root

and past that in your htaccess, just after the "RewriteEngine On" line.

Code: Select all

<IfModule mod_expires.c>
	<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
		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))$ smartoptimizer/?$1
	</IfModule>
</IfModule>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
	FileETag none
</FilesMatch>
Don't forget to verify all the options in the configuration file "smartoptimizer/config.php"

Anyway, all is well explained here:

http://farhadi.ir/works/smartoptimizer
Joomla 1.5.21 Fr/En

choke_nl
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Jul 28, 2008 4:24 pm

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by choke_nl » Mon Nov 17, 2008 11:45 am

Thank you very much for sharing this information!

You solved all my questions :)

User avatar
simbus82
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sat May 19, 2007 1:59 pm
Location: Parma (Italy)
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by simbus82 » Mon Nov 17, 2008 2:32 pm

In my pages i can't go near 80 points because i always cannot have Expires headers or js at the end of a page...

There is a Solution at least for the expires headers?

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Mon Nov 17, 2008 6:55 pm

Hi, for the expires, yes sure.

First of all, I suggest you to read this two links, the first is about Apche mod_expires for 1.3 and the second one, mod_deflate (almost the same as gzip) is for Apache 2.2.

After this, normally you achieved to make your own config file for an .htaccess that you can put in the directory where the files that causing problems are, or in the root directly (but in this case be carefull with the interactions of smartoptimizer!)

Here you are some examples of what i made for me.

This one is for my images directory:

Code: Select all

<Files .htaccess>
order allow,deny
deny from all
</Files>
###activate mod_deflate
SetOutputFilter DEFLATE

###exclude some types (no compression)
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary)

### activate mod_expires
ExpiresActive On

### Expire les fichiers un mois après leur accès
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
For css and js you must add this two lines:

Code: Select all

ExpiresByType text/css A2592000
ExpiresByType application/x-javascript A2592000
Note the A2592000 that's telling the 1 month expiration delay.

If you want to exclude some types but for the mod_gzip, in fact no compression:

Code: Select all

<IfModule mod_gzip.c>
 mod_gzip_on Yes
 mod_gzip_item_exclude         file       \.(js|css)$
 mod_gzip_item_exclude         file       \.gz$
 mod_gzip_item_exclude         file       \.zip$
 mod_gzip_item_exclude         mime       ^image/
</IfModule>
But this one is doing the same job as smartoptimizer does.

So with that you can make a really personal configuration, just suits your needs.

Last thing that I can say is that you can never have a 80 score all the time, especially because if you got some flash banners or googles ads, you can do nothing with them.
So sometimes you will have 80 and other times less or more.

And be carrefull to NOT compress or minify th JS that are already ! Some plugins or modules does that by default, so check carefully your configurations.
Joomla 1.5.21 Fr/En

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by seenguyen » Tue Nov 18, 2008 6:33 am

thanks for your advice!

I did as:
Upload the "smartoptimizer" folder into root
then copy & paste htaccess to my .htaccess
I kept the 'basedir' in config file as the origin: '../'
Am I rite?

So How can I check the the smartoptimizer's running or not?
See Nguyen

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Tue Nov 18, 2008 6:37 pm

Yes it's right

To check if it's running, just look in the directory "/smartoptimizer/cache/"

Because, yes, there's a cache too !

You will see some files inside, that have been gzip and have an expire tag, some of css and others of js, and sometime a js file alone, because the limit for concatenation were reached.

And you will see much less http requests on the right side of the results with YSlow.
Joomla 1.5.21 Fr/En

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by seenguyen » Wed Nov 19, 2008 1:53 am

thanks! It's running in my site!
[removed self promotion]
Again, thanks
Last edited by Geoff on Sun Dec 07, 2008 7:11 am, edited 1 time in total.
Reason: removed self promotion
See Nguyen

alexistkd
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sun Dec 14, 2008 12:38 am

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by alexistkd » Sun Dec 14, 2008 12:43 am

this a great solution but i have some issues i use joomla 1.5.8 with mod_eventlistcal15q a calendar, when i config this solution it goes fast my web but the css of eventlistcal turns crazy and looks bad who can help me please. Thanks in advance.

alexistkd
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sun Dec 14, 2008 12:38 am

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by alexistkd » Sun Dec 14, 2008 12:58 am

another thing, my website have css optimized already, but i didnt optimize module css only the template.css. And the administration panel got errors :S i have to remove script to make the admin panel works.

and my website its on subdir /web/

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by seenguyen » Mon Dec 15, 2008 7:33 am

Hi SiriusOCT,

this solution makes my site faster but it disable the javascript effects as Yoo-tooltip

Any solution for JS?
See Nguyen

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by seenguyen » Mon Dec 15, 2008 9:39 am

seenguyen wrote:thanks! It's running in my site!
[removed self promotion]
Again, thanks

Last edited by Geoff on Sun Dec 07, 2008 7:11 am, edited 1 time in total.
removed self promotion

hi Geoff,

I think you misunderstood, I just show him/her my site after using his code & say thanks!
Please read the communication carefully before you say "removed self promotion".

regards,
See Nguyen

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Tue Dec 16, 2008 9:58 am

seenguyen wrote:Hi SiriusOCT,

this solution makes my site faster but it disable the javascript effects as Yoo-tooltip

Any solution for JS?
I suggest you to try to activate or desactivate thoses options in the config.php of smartoptimizer:

I bet that the first one will do the job

# minify: true or false
you can enable/disable minify functionality through this option.
# concatenate: true or false
you can enable/disable concatenate functionality through this option.
Joomla 1.5.21 Fr/En

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Wed Dec 17, 2008 6:13 pm

Hi all,

Great news, the 1.7 version is here ! Download SmartOptimizer v1.7 beta

What's new :

v1.7 beta - December 16 2008

* Ability to ignore some file types (e.g. htc) from being embedded through embedExceptions config.
* gzip compression level can be set in config file.
* Some bugs fixed.

I recommend to change the compression level to 6 instead of 9 default level in the config.php

6 is the most well load balanced choice
Last edited by SiriusOCT on Wed Dec 17, 2008 7:29 pm, edited 1 time in total.
Joomla 1.5.21 Fr/En

alexistkd
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sun Dec 14, 2008 12:38 am

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by alexistkd » Wed Dec 17, 2008 6:29 pm

SiriusOCT brother, regarding my question what can be? i have my joomla site in subdir /web/ because in root i have flash intro, so i want to improve joomla dir /web/ how i do? when i install smartoptimizer in root and change .htaccess file, then my website looks white without .css, what can be? Thanks in advance

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Wed Dec 17, 2008 7:24 pm

Hello,

Just look inside config.php of smartoptimizer at the first parameter:

//base dir (a relative path to the base directory)
$settings['baseDir'] = '../';

just change the ../ according to where you are so simply ../web/ for you I presume
Joomla 1.5.21 Fr/En

alexistkd
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sun Dec 14, 2008 12:38 am

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by alexistkd » Thu Dec 18, 2008 6:50 am

nothing i put everything and my site goes white like without css files :S here is my original .htaccess without smartoptimizer:

Code: Select all

<IfModule mod_headers.c>
Header unset ETag
Header unset Last-Modified
</IfModule>
FileETag None
<FilesMatch "\.(ico|gz|JPG|jpg|jpeg|png|gif|js|css|swf)$">
Header unset Cache-control
Header set Expires "Wed, 28 Apr 2010 20:00:00 GMT"
</FilesMatch>

# preserve bandwidth for PHP enabled servers
<ifmodule mod_php4.c>
 php_value zlib.output_compression 16386
</ifmodule>

# cache images and flash content for one month
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>

# cache text, css, and javascript files for one week
<FilesMatch ".(js|css|pdf|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>

# cache html and htm files for one day
<FilesMatch ".(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)

RewriteBase /web


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Thu Dec 18, 2008 7:55 am

You don't need all of that:

Code: Select all

<IfModule mod_headers.c>
Header unset ETag
Header unset Last-Modified
</IfModule>
FileETag None
<FilesMatch "\.(ico|gz|JPG|jpg|jpeg|png|gif|js|css|swf)$">
Header unset Cache-control
Header set Expires "Wed, 28 Apr 2010 20:00:00 GMT"
</FilesMatch>

# preserve bandwidth for PHP enabled servers
<ifmodule mod_php4.c>
php_value zlib.output_compression 16386
</ifmodule>

# cache images and flash content for one month
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>

# cache text, css, and javascript files for one week
<FilesMatch ".(js|css|pdf|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>

# cache html and htm files for one day
<FilesMatch ".(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
Just only put the code for smartoptimizer (the one in my first post), but perhaps you've already done before ?
Joomla 1.5.21 Fr/En

alexistkd
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sun Dec 14, 2008 12:38 am

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by alexistkd » Thu Dec 18, 2008 8:13 am

already try that :( no luck

alexistkd
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sun Dec 14, 2008 12:38 am

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by alexistkd » Mon Dec 22, 2008 1:23 am

Thanks to SiriusOCT and smartoptimizer my website its now fixed and loads fasts. I haved issues because i put smartoptimizer folder and .htaccess in my root / and not in my joomla root thats its /web/ with Sirius help website now fixed and running with smartopimizer thanks again bro god bless you always.

mark75to
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Dec 22, 2008 1:17 pm

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by mark75to » Mon Dec 22, 2008 1:36 pm

Hi to all,
Sorry for my bad english. I'm italian.
I'm new of this site. I'm trying to use smaroptimizer with my site. I have tried in different way but without result. Always my page are not correctly load. I have tried to disable concatenate option and embed future but nothing... site doesn't works correctly.
I'm using joomla 1.5.8 + sefadvance.
This is my .htaccess with smartoptimizer......I have add smartoptimizer htaccess after "RewriteEngine On" clausole but I think that I'm wrong something. :(
Thanks a lot in advance for any help.....

Code: Select all


##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On


<IfModule mod_expires.c>
	<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
		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))$ smartoptimizer/?$1
	</IfModule>
</IfModule>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
	FileETag none
</FilesMatch>




########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

#RewriteBase /


########## Begin - Joomla! core SEF Section
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} !^/index.php
#RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
#RewriteRule (.*) index.php
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section



########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section


User avatar
JCarnley
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Fri Apr 07, 2006 2:57 am
Location: Export, PA -- USA
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by JCarnley » Sat Dec 27, 2008 3:44 pm

Hi, started using this and it certainly increased the speed of page loading. When I checked under joomlaxplorer I got a notice that it needed overlib_mini.js in a certain folder so I uploaded that. I also had images within modules disappear on me but only on certian pages. I'm suspicious because they are both custom modules used just to display logos. I set the compression level to 6 as suggested and I will look over the config file and report back.

Learning more: This little gem is working perfectly I boosted by Yslow grade from mid 30'sto the mid 80's. I was having a couple of modules go out on certian pages but it turned out to be an SEF issue. As far as I can tell this code is not having any adverse effects on the site and I run a lot of JS and have scads of CSS's.
Last edited by JCarnley on Sat Dec 27, 2008 10:51 pm, edited 1 time in total.
In His Service

KU0G
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Dec 06, 2008 3:00 pm

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by KU0G » Sat Dec 27, 2008 5:55 pm

Would you consider putting your utility distribution into ZIP form in addition to tar.gz?

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Mon Dec 29, 2008 12:33 am

KU0G wrote:Would you consider putting your utility distribution into ZIP form in addition to tar.gz?
Here you are the ZIP
smartoptimizer-1.7-beta.zip
You do not have the required permissions to view the files attached to this post.
Joomla 1.5.21 Fr/En

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Mon Dec 29, 2008 12:35 am

mark75to wrote:I have tried in different way but without result. Always my page are not correctly load. I have tried to disable concatenate option and embed future but nothing... site doesn't works correctly.
I'm using joomla 1.5.8 + sefadvance.
This is my .htaccess with smartoptimizer......I have add smartoptimizer htaccess after "RewriteEngine On" clausole but I think that I'm wrong something. :(
Thanks a lot in advance for any help.....
Try:

Code: Select all

RewriteBase /
instead of:

Code: Select all

#RewriteBase /
Joomla 1.5.21 Fr/En

DianaRae
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Dec 26, 2008 5:52 pm
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by DianaRae » Fri Jan 09, 2009 7:29 pm

I am trying out your Smart Optimizer for my joomla site.

I have tried everything and keep getting an error. I am making the joomla site in a directory as a test site http://www.myrealsite.com/1allsafetest/

I put the smartoptimizer folder in to the folder /1allsafetest/

Then I changed the config to be:
//base dir (a relative path to the base directory)
$settings['baseDir'] = '../1allsafetest/';

I put the htaccess file in the same folder /1allsafetest/

apache mod rewrite is on.

Nothing is caching to smart optimizer. And when I go in to my joomla admin panel it says "SmartOptimizer Error: File is out of the base directory"

Do you have any advice?

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Fri Jan 09, 2009 8:04 pm

Hi,
(I'm not the coder of smartoptimizer, the credits go to Ali Farhadi)

You don't need to put this baseDir: ../1allsafetest/
Just simply keep the: ../

Because this is relative to the base where smartoptimizer is..
Not relative to the "base root"

S.O just need to know that to access he's own files and to check he's own cache directory.
Joomla 1.5.21 Fr/En

DianaRae
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Dec 26, 2008 5:52 pm
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by DianaRae » Fri Jan 09, 2009 8:25 pm

@SiriusOCT,

OK so the smartoptimizer folder is here ../mytestsitefolder/smartoptimizer/

the htaccess file is in the mytestsitefolder

I changed the config to be:
$settings['baseDir'] = '../';

and I am still getting the same error:

"SmartOptimizer Error: File is out of the base directory" in the joomla admin only. It is caching now. But, I still get the error.

I do not know what to do. :(

User avatar
SiriusOCT
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sun Jan 14, 2007 1:18 pm
Location: Paris
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by SiriusOCT » Fri Jan 09, 2009 9:08 pm

Oh ok,

that's probably because you've got a plugin or a component that can't get he's own path so the URI for him is wrong.

Replace the index.php of S.O with this one attached (unzip first) and then when you will have the popup again, you will see wich file exactly got the problem. So check this and tell me what the popup exactly say.
index.zip
You do not have the required permissions to view the files attached to this post.
Joomla 1.5.21 Fr/En

DianaRae
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Dec 26, 2008 5:52 pm
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by DianaRae » Fri Jan 09, 2009 9:27 pm

SiriusOCT wrote:So check this and tell me what the popup exactly say.
It says: "SmartOptimizer Error: File is out of the base directory./administrator/plugins/system/rokbox/rokbox.js

seenguyen
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jan 04, 2007 3:57 pm
Contact:

Re: All in one solution for Gzip, Minify, Emebed, Concatenate

Post by seenguyen » Sat Jan 10, 2009 8:18 am

@SiriusOCT

Should I OFF both of #minify & #concatenate or only #minify?
See Nguyen


Locked

Return to “Administration 1.5”