<IfModule mod_rewrite.c>
Options +FollowSymLinks -Indexes
RewriteEngine On
RewriteBase /codeigniter

#url normalizer
RewriteCond %{HTTP_HOST} !=""
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+(.*?)/+(/[^\s]+) [NC]
RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.*)\sHTTP/[0-9.]+$ [OR]
RewriteCond %{THE_REQUEST} ^[A-Z]+\s(.*/)/+\sHTTP/[0-9.]+$
RewriteRule ^ %1%2 [R=302,L,NE]
RewriteRule ^(.+?)/$ http://%{HTTP_HOST}/$1 [R=302,NE,L]

#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
#RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

# remove index.php and allow sitemap.xml and google.html tobe accessd

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(sitemap.xml|google.html) [NC]
RewriteRule . index.php
DirectoryIndex index.php
</IfModule>

#expired cache
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/pdf "access plus 1 month"
    ExpiresByType text/x-javascript "access plus 1 month"
    ExpiresByType application/x-shockwave-flash "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access plus 2 days"
</IfModule>

# mod_deflate configuration

#LoadModule deflate_module modules/mod_deflate.so

#<IfModule mod_deflate.c>

#	SetOutputFilter DEFLATE

#        AddOutputFilterByType DEFLATE text/plain
#        AddOutputFilterByType DEFLATE text/html
#        AddOutputFilterByType DEFLATE text/xml
#        AddOutputFilterByType DEFLATE text/css
#        AddOutputFilterByType DEFLATE application/xml
#        AddOutputFilterByType DEFLATE application/xhtml+xml
#        AddOutputFilterByType DEFLATE application/rss+xml
#        AddOutputFilterByType DEFLATE application/javascript
#        AddOutputFilterByType DEFLATE application/x-javascript

#        DeflateCompressionLevel 9

#        BrowserMatch ^Mozilla/4 gzip-only-text/html
#        BrowserMatch ^Mozilla/4\.0[678] no-gzip
#        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

#        DeflateFilterNote Input instream
#        DeflateFilterNote Output outstream
#        DeflateFilterNote Ratio ratio

#        LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate

#</IfModule>

# php value
# this is default setting from XAMPP

php_flag apc.cache_by_default Off
php_value memory_limit 128M
php_value upload_max_filesize 2M
php_value post_max_size 8M
php_value max_execution_time 30
php_value max_input_time 60

#environment
SetEnv CI_ENV development