eusonlito/PHPCan/master/.htaccess - Htaccess File

eusonlito/PHPCan/master/.htaccess

AddDefaultCharset UTF-8

Options -Indexes

<Files ~ "^.">
  Order allow,deny
  Deny from all
</Files>

<IfModule mod_rewrite.c>
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule . - [S=2]
  RewriteRule /_(.*?)_/ file.php [L,QSA]
  RewriteRule ^.*$ index.php [L,QSA]
</IfModule>

<IfModule mod_deflate.c>
  SetInputFilter DEFLATE

  SetEnvIfNoCase Request_URI (?i).(gif|jpe?g|png|rar|zip|pdf|doc|swf|flv|mov|wma|mp3|mp4|avi|mp?g|webm)$ no-gzip dont-vary

  AddOutputFilterByType DEFLATE application/atom_xml application/javascript application/rss+xml application/xhtml+xml application/xml application/x-httpd-php application/x-javascript image/svg+xml image/x-icon text/css text/javascript text/html text/plain text/richtext text/xml text/xsd text/xsl

  <IfModule mod_setenvif.c>
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4.0[678] no-gzip
    BrowserMatch bMSIE !no-gzip !gzip-only-text/html
    BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html
  </IfModule>

  <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
  </IfModule>
</IfModule>

<IfModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file .(html?|txt|css|js|php)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/javascript.*
  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_expires.c>
  ExpiresActive On
  ExpiresByType text/css A31536000
  ExpiresByType application/javascript A31536000
  ExpiresByType application/x-javascript A31536000
  ExpiresByType text/javascript A31536000
  ExpiresByType text/html A3600
  ExpiresByType text/richtext A3600
  ExpiresByType image/svg+xml A3600
  ExpiresByType text/plain A3600
  ExpiresByType text/xsd A3600
  ExpiresByType text/xsl A3600
  ExpiresByType text/xml A3600
  ExpiresByType video/asf A31536000
  ExpiresByType video/avi A31536000
  ExpiresByType image/bmp A31536000
  ExpiresByType application/java A31536000
  ExpiresByType video/divx A31536000
  ExpiresByType application/msword A31536000
  ExpiresByType application/x-msdownload A31536000
  ExpiresByType image/gif A31536000
  ExpiresByType application/x-gzip A31536000
  ExpiresByType image/x-icon A31536000
  ExpiresByType image/jpeg A31536000
  ExpiresByType application/vnd.ms-access A31536000
  ExpiresByType audio/midi A31536000
  ExpiresByType video/quicktime A31536000
  ExpiresByType audio/mpeg A31536000
  ExpiresByType video/mp4 A31536000
  ExpiresByType video/mpeg A31536000
  ExpiresByType application/vnd.ms-project A31536000
  ExpiresByType application/vnd.oasis.opendocument.database A31536000
  ExpiresByType application/vnd.oasis.opendocument.chart A31536000
  ExpiresByType application/vnd.oasis.opendocument.formula A31536000
  ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
  ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
  ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
  ExpiresByType application/vnd.oasis.opendocument.text A31536000
  ExpiresByType audio/ogg A31536000
  ExpiresByType application/pdf A31536000
  ExpiresByType image/png A31536000
  ExpiresByType application/vnd.ms-powerpoint A31536000
  ExpiresByType audio/x-realaudio A31536000
  ExpiresByType application/x-shockwave-flash A31536000
  ExpiresByType application/x-tar A31536000
  ExpiresByType image/tiff A31536000
  ExpiresByType audio/wav A31536000
  ExpiresByType audio/wma A31536000
  ExpiresByType application/vnd.ms-write A31536000
  ExpiresByType application/vnd.ms-excel A31536000
  ExpiresByType application/zip A31536000
</IfModule>

<FilesMatch "(?i).(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
  <IfModule mod_headers.c>
    Header set Pragma "public"
    Header set Cache-Control "public, must-revalidate, proxy-revalidate"
  </IfModule>

  FileETag MTime Size

  <IfModule mod_headers.c>
    Header set X-Powered-By "phpCan"
  </IfModule>
</FilesMatch>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, no-gzip, Pragma, REQUEST_FILENAME, REQUEST_URI

Comments

Apache