KaisarCode/KCKickoff/master/dot.htaccess - Htaccess File

KaisarCode/KCKickoff/master/dot.htaccess

###############################################
# Basic Configuration file for Apache servers #
###############################################

#REWRITE RULES#
<IfModule mod_rewrite.c>
  RewriteBase /
  RewriteEngine on
  
  #Normalize domains - replace by your domain name ##############
  RewriteCond %{HTTP_HOST} ^www.sitename.com [NC]
  RewriteRule ^(.*)$ http://sitename.com/$1 [L,R=301]
  ###############################################################
  
  #Protecting directories and files #############################
  RewriteRule ^(.htaccess*) - [F,L,NC]
  RewriteRule ^(my_directory|my_other_directory)/.*.(.*)$ - [F,L,NC]
  ###############################################################
  
  #Rewrite inexistent files to index ############################
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  ###############################################################
</IfModule>

#Prevent cache (delete after finish development) ##############
<filesMatch ".(html|htm|js|css)$">
  FileETag None
  <ifModule mod_headers.c>
     Header unset ETag
     Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
     Header set Pragma "no-cache"
     Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
  </ifModule>
</filesMatch>
#/Prevent caché ###############################################

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, no-cache, Pragma, REQUEST_FILENAME, REQUEST_URI

Comments

Apache