subikar/itcslive/master/.htaccess - Htaccess File

subikar/itcslive/master/.htaccess

<IfModule mod_rewrite.c>
  RewriteEngine on
  Options -Indexes  
  # Modify the RewriteBase if you are using zina in a subdirectory and
  # the rewrite rules are not working properly.
  # RewriteBase /zina

  # Rewrite current-style URLs of the form 'index.php?p=x'.

  RewriteCond %{HTTP_HOST} ^www.itcslive.in [NC]
  RewriteCond %{SERVER_PORT} 80 
  RewriteRule ^(.*)$ https://www.itcslive.in/$1 [R,L]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ classes/404.php [L,QSA]
</IfModule>
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</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>
<IfModule mod_headers.c>
  <FilesMatch ".(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
  </FilesMatch>
</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, REQUEST_FILENAME, REQUEST_URI, SERVER_PORT

Comments

Apache