astilla/RunTracker/master/www/.htaccess - Htaccess File

astilla/RunTracker/master/www/.htaccess

#
# We set an 'Authorization' header in the Angular app for the bearer token but Slim/PHP
# strips this out so we need to reweite it as an 'HTTP_AUTHORIZATION' header.
#
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

#
# Enable rewrite engine and route requests to framework
#
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^/?api/(.*)$ /api/index.php [L,QSA,NC]
RewriteRule ^(.*) /index.html [NC,L]

# You need: 'AllowOverride Indexes' in your vhost for this to be allowed in .htaccess
#<IfModule mod_expires.c>
#    ExpiresActive On
#    ExpiresByType application/javascript "now plus 1 hours"
#    ExpiresByType application/x-javascript "now plus 1 hours"
#    ExpiresByType text/javascript "now plus 1 hours"
#    ExpiresByType text/css "now plus 1 hours"
#    ExpiresByType image/png "now plus 1 hours"
#    ExpiresByType image/gif "now plus 1 hours"
#    ExpiresDefault A0
#</IfModule>

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME

Comments

Apache