<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=Edge,chrome=1"
# mod_headers can't match by content-type, but we don't want to send this header on *everything*...
<FilesMatch ".(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webm|webp|woff|xml|xpi)$">
Header unset X-UA-Compatible
</FilesMatch>
# CORS
# Header always set Access-Control-Allow-Origin "*"
# Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
# Header always set Access-Control-Max-Age "1000"
# Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
#workaround for php running as fcgi to set PHP_AUTH_PW and PHP_AUTH_USER for http basic auth
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# změnit na vlastní adresář na localhost
# relativní k root, takže pokud www.blabla.cz -> /index
RewriteRule ^/?$ /silex-users/web/index [QSA,L,R=302]
# přepisuje url tak, aby směrovaly do adresáře web/
# RewriteCond $1 !^web/
# RewriteCond %{DOCUMENT_ROOT}/web/$1 -f [OR]
# RewriteCond %{DOCUMENT_ROOT}/web/$1 -d
# RewriteRule ^(.*)$ web/%1/$1 [L]
# pokud url nevede na skutečný soubor (css,js,etc), tak všechny requesty posílá na front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>