harasaski/introarch/master/statics/.htaccess - Htaccess File

harasaski/introarch/master/statics/.htaccess

AddType text/x-component .htc
AddType "text/javascript;charset=UTF-8" .js
Options -Indexes

<IfModule mod_rewrite.c>
 
  ####### STOP IMAGE HOTLINKING #######
  RewriteCond %{HTTP_REFERER} !^http://(.+.)?introarch.com/ [NC]
  RewriteCond %{HTTP_REFERER} !^http://localhost/ [NC]
  RewriteCond %{HTTP_REFERER} !^$
  RewriteCond %{HTTP_REFERER} !google. [NC]
  RewriteCond %{HTTP_REFERER} !bing. [NC]
  RewriteCond %{HTTP_REFERER} !search?q=cache [NC]
  RewriteCond %{HTTP_REFERER} !msn. [NC]
  RewriteCond %{HTTP_REFERER} !yahoo. [NC]
  RewriteRule .*.(jpe?g|gif|jpg|bmp|png)$ images/blank.gif  [L]

</IfModule>
 

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/x-javascript application/x-httpd-php application/rss+xml application/atom_xml
  
   <FilesMatch ".(css|js|htc|x?html?|php)$">
          SetOutputFilter DEFLATE 
   </FilesMatch>
</IfModule>
 
<IfModule mod_gzip.c>
    mod_gzip_on       Yes
    mod_gzip_dechunk  Yes
    mod_gzip_item_include file      .(html?|txt|css|htc|js|php|html|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>
  
  # Header set Set-Cookie "language=%{lang}e; path=/;" env=lang
      
  # 1 YEAR
  <FilesMatch ".(ico|pdf|flv)$">
  Header set Cache-Control "max-age=29030400, public"
  </FilesMatch>
  
  # 1 WEEK
  <FilesMatch ".(jpg|jpeg|png|gif|swf)$">
  Header set Cache-Control "max-age=29030400, public"
  </FilesMatch>
  
  # 2 DAYS
  <FilesMatch ".(xml|txt|css|js)$">
  Header set Vary "Accept-Encoding"
  Header set Cache-Control "max-age=29030400, public"
  </FilesMatch>
  
  # 1 MIN
  <FilesMatch ".(php)$">
  Header set Cache-Control "max-age=29030400, public"
  </FilesMatch>
 
</IfModule>
 
<IfModule mod_expires.c>
  ExpiresActive On
 
  ExpiresByType image/x-icon A29030400
  ExpiresByType application/x-javascript A29030400
   ExpiresByType text/css A29030400
  ExpiresByType image/gif A29030400
  ExpiresByType image/png A29030400
  ExpiresByType image/jpeg A29030400
  ExpiresByType image/jpg A29030400
  ExpiresByType text/plain A29030400
  ExpiresByType application/x-shockwave-flash A29030400
  ExpiresByType video/x-flv A29030400
  ExpiresByType application/pdf A29030400
  ExpiresByType text/html A29030400
</IfModule>
 

 
<IfModule mod_headers.c>
     Header unset ETag
</IfModule>
 FileETag None
 
 
<IfModule mod_headers.c>
     Header unset Last-Modified
</IfModule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_REFERER

Comments

Apache