sashid76/myci/master/.htaccess - Htaccess File

sashid76/myci/master/.htaccess

<IfModule pagespeed_module>  
    ModPagespeed on
    ModPagespeedEnableFilters remove_comments
    ModPagespeedEnableFilters rewrite_javascript
    ModPagespeedEnableFilters rewrite_css
    ModPagespeedEnableFilters rewrite_images
    #ModPagespeedEnableFilters defer_javascript
    # using commands,filters etc  
</IfModule>

<ifModule mod_deflate.c>  
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript  
</ifModule> 

<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

# BEGIN Expire headers  
<ifModule mod_expires.c>  
    ExpiresActive On  
    ExpiresDefault "access plus 5 seconds"  
    ExpiresByType image/x-icon "access plus 2592000 seconds"  
    ExpiresByType image/jpeg "access plus 2592000 seconds"  
    ExpiresByType image/png "access plus 2592000 seconds"  
    ExpiresByType image/gif "access plus 2592000 seconds"  
    ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"  
    ExpiresByType text/css "access plus 604800 seconds"  
    ExpiresByType text/javascript "access plus 216000 seconds"  
    ExpiresByType application/javascript "access plus 216000 seconds"  
    ExpiresByType application/x-javascript "access plus 216000 seconds"  
    ExpiresByType text/html "access plus 600 seconds"  
    ExpiresByType application/xhtml+xml "access plus 600 seconds"  
</ifModule>  
# END Expire headers

# BEGIN Cache-Control Headers  
<ifModule mod_headers.c>  
    <filesMatch ".(ico|jpe?g|png|gif|swf)$">  
        Header set Cache-Control "public"  
    </filesMatch>  
    <filesMatch ".(css)$">  
        Header set Cache-Control "public"  
    </filesMatch>  
    <filesMatch ".(js)$">  
        Header set Cache-Control "private"  
    </filesMatch>  
    <filesMatch ".(x?html?|php)$">  
        Header set Cache-Control "private, must-revalidate"  
    </filesMatch>  
</ifModule>  
# END Cache-Control Headers  

<ifModule mod_headers.c>
  Header unset ETag
</ifModule>
FileETag None

<ifModule mod_headers.c>
  Header unset Last-Modified
</ifModule>

<ifModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
  AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
  AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
  AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
  AddOutputFilterByType DEFLATE font/truetype font/opentype
</ifModule>

# BEGIN Compress text files
<ifModule mod_deflate.c>
  <filesMatch ".(css|js|x?html?|php)$">
    SetOutputFilter DEFLATE
  </filesMatch>
</ifModule>
# END Compress text files

AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
    RewriteEngine On
  
    # my url is http://localhost/arny
    #RewriteBase /arny/
  # set your own
  RewriteBase /myci/
  
    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

php_value upload_max_filesize 100M
php_value post_max_size 100M

On Github License

Files

Download PDF of Htaccess file
DEFLATE, REQUEST_FILENAME, REQUEST_URI

Comments

Apache