## BEGIN Known Webserver Config (don't remove)

<IfModule mod_rewrite.c>
    RewriteEngine on
    #RewriteBase /

    RewriteRule ^\.git(|hub)/ - [F]

    RewriteCond %{HTTP:Authorization} ^(.+)$
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{ENV:BASE} ^$
    RewriteCond $1::%{REQUEST_URI} ^(.*)::(.*?)\1$
    RewriteRule ^(.*)$ - [ENV=BASE:%2]

    RewriteRule ^js/canary\.js$ %{ENV:BASE}/js/known.min.js [L]

    # The query string cache trick doesn't really work, so use rewrite rules instead
    RewriteRule ^js/[0-9]+/(.*)$ %{ENV:BASE}/js/$1 [L]    
    RewriteRule ^css/[0-9]+/(.*)$ %{ENV:BASE}/css/$1 [L]    

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ %{ENV:BASE}/index.php?/$1 [L,QSA]
    RewriteRule ^Uploads.* - [F]
</IfModule>
<Files  ~ "\.dist$">
  Require all denied
</Files>
<Files ~ "composer\.lock">
  Require all denied
</Files>
<Files ~ "composer\.json">
  Require all denied
</Files>
<Files ~ "package\.json">
  Require all denied
</Files>
<Files ~ "Gruntfile\.js">
  Require all denied
</Files>
<Files ~ "known\.php">
  Require all denied
</Files>
<Files  ~ "\.known">
  Require all denied
</Files>
<Files  ~ "\.ini$">
  Require all denied
</Files>
<Files ~ "\.yml$">
  Require all denied
</Files>
<Files ~ "\.xml$">
  Require all denied
</Files>
<Files ~ "\.bak$">
  Require all denied
</Files>
<Files ~ "sitemap\.xml">
  Require all granted
</Files>
<Files ~ "feed\.xml">
  Require all granted
</Files>
<Files ~ "rss\.xml">
  Require all granted
</Files>
#<Files ~ "\.php$">
#  Require all denied
#</Files>
<Files ~ "warmup\/*\.*">
  Require all granted
</Files>
<Files ~ "index\.php">
  Require all granted
</Files>

AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm

## END Known Webserver Config (don't remove)
