mpopp75/html5test/version-8.0/.htaccess - Htaccess File

mpopp75/html5test/version-8.0/.htaccess

AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.html5test.com$
RewriteRule ^ http://html5test.com%{REQUEST_URI} [L,R=301]

RewriteRule ^compare.html$          /compare/browser/index.html                [R]
RewriteRule ^results.html$          /results/desktop.html                  [R]
RewriteRule ^results-mobile.html$      /results/mobile.html                  [R]
RewriteRule ^results-tablets.html$      /results/tablet.html                  [R]
RewriteRule ^results-tv.html$        /results/television.html                [R]

RewriteRule ^api/(.+)$             /backend/index.php?method=$1&%{QUERY_STRING}
RewriteRule ^s/(.+).html$           /backend/controllers/saved.php?id=$1
RewriteRule ^compare/browser/index.html$   /backend/controllers/browser.php?%{QUERY_STRING}
RewriteRule ^compare/browser/(.+).html$   /backend/controllers/browser.php?show=$1&%{QUERY_STRING}
RewriteRule ^compare/feature/index.html$   /backend/controllers/feature.php?%{QUERY_STRING}
RewriteRule ^compare/feature/(.+).html$   /backend/controllers/feature.php?show=$1&%{QUERY_STRING}
RewriteRule ^results/desktop.html$      /backend/controllers/results.php?type=desktop
RewriteRule ^results/mobile.html$      /backend/controllers/results.php?type=mobile
RewriteRule ^results/tablet.html$      /backend/controllers/results.php?type=tablet
RewriteRule ^results/gaming.html$      /backend/controllers/results.php?type=gaming
RewriteRule ^results/television.html$    /backend/controllers/results.php?type=television
RewriteRule ^results/other.html$      /backend/controllers/results.php?type=other
RewriteRule ^results/latest.html$      /backend/controllers/latest.php
RewriteRule ^results/search.html$      /backend/controllers/search.php
RewriteRule ^results/related/(.+).html$   /backend/controllers/fingerprint.php?id=$1
RewriteRule ^results/(.+)/timeline/(.+).html$   /backend/controllers/timeline.php?id=$2&type=$1
RewriteRule ^results/timeline/(.+).html$   /backend/controllers/timeline.php?id=$1&type=mobile
RewriteRule ^devicelab/inventory.html$    /backend/controllers/lab-inventory.php
RewriteRule ^devicelab/?$          /backend/controllers/lab.php

RewriteRule ^favicon(.*)$          /images/icons/favicon$1
RewriteRule ^apple-touch-icon(.*)$      /images/icons/apple-touch-icon$1
RewriteRule ^mstile-(.*)$          /images/icons/mstile-$1
RewriteRule ^browserconfig.xml        /images/icons/browserconfig.xml

RewriteRule ^scripts/useragents        http://api.whichbrowser.net/warning.js

<FilesMatch ".+.[woff|eot|svg|ttf]">
<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

<FilesMatch "detect.html">
<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

SetEnvIf User-Agent .*Bada.* BROKEN_CSP

<FilesMatch "csp.html">
<IfModule mod_headers.c>
    Header set Content-Security-Policy "default-src 'unsafe-inline' data: *; frame-src *; options inline-script;" env=!BROKEN_CSP
</IfModule>
</FilesMatch>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST, QUERY_STRING, REQUEST_URI

Comments

Apache