Welcome Guest, Not a member yet? Register   Sign In
how to intall smartoptimizer in codeigniter
#1

[eluser]Unknown[/eluser]
Hi i need to install smartoptimizer to my codeigniter aplization.I try doing what smartoptimizer post at his intall section but it does not work.Im using smartoptimizer version 1.8 and mi aplication folder system is like this.

web server root/
system_cgc/ /*folder that contains codiigniter aplication files*/
index.php
.htaccess
system /*the codeigniter aplication system folder*/
application /*the codeigniter aplication folder*/
smartoptimizer/ /*the folder thata contains smart optimizer files*/
cache
.htaccess
config.php
index.php
the system htaccess file code:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]


# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /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>

The smartoptimizer htacces filecode:

php_flag zlib.output_compression Off
php_flag output_buffering Off
php_value output_handler NULL

And the values from smartoptimizer config file:

/*
* SmartOptimizer Configuration File
*/

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

//Encoding of your js and css files. (utf-8 or iso-8859-1)
$settings['charSet'] = 'utf-8';

//Show error messages if any error occurs (true or false)
$settings['debug'] = true;

//use this to set gzip compression On or Off
$settings['gzip'] = true;

//use this to set gzip compression level (an integer between 1 and 9)
$settings['compressionLevel'] = 9;

//these types of files will not be gzipped nor minified
$settings['gzipExceptions'] = array('gif','jpeg','jpg','png','swf');

//use this to set Minifier On or Off
$settings['minify'] = true;

//use this to set file concatenation On or Off
$settings['concatenate'] = true;

//separator for files to be concatenated
$settings['separator'] = ',';

//specifies whether to emebed files included in css files using the data URI scheme or not
$settings['embed'] = true;

//The maximum size of an embedded file. (use 0 for unlimited size)
$settings['embedMaxSize'] = 5120; //5KB

//these types of files will not be embedded
$settings['embedExceptions'] = array('htc');

//to set server-side cache On or Off
$settings['serverCache'] = true;

//if you change it to false, the files will not be checked for modifications and always cached files will be used (for better performance)
$settings['serverCacheCheck'] = true;

//cache dir
$settings['cacheDir'] = 'cache/';

//prefix for cache files
$settings['cachePrefix'] = 'so_';

//to set client-side cache On or Off
$settings['clientCache'] = true;

//Setting this to false will force the browser to use cached files without checking for changes.
$settings['clientCacheCheck'] = false;
?&gt;




i tried calling smartoptimizer every way using smartoptimizer/? prefix on my links to css and js files but it does not work.

HELP PLEASE.THANKS


Messages In This Thread
how to intall smartoptimizer in codeigniter - by El Forum - 11-23-2012, 07:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB