# Tell PHP that the mod_rewrite module is ENABLED. #SetEnv HTTP_MOD_REWRITE 1 RewriteEngine On ## http -> https RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE,QSA] # special case for the favicon RewriteRule favicon\.ico$ images/favicon.ico # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !favicon\.ico$|sitemap\.xml$|crossdomain\.xml$ # otherwise forward it to index.php RewriteRule . index.php # Allows PHP to moderate HTTP Basic authorization in CGI/FCGI so that the REST # API's authentication method can work in shared hosting environments RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] Order allow,deny Deny from all