RewriteEngine On # Force HTTPS RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # API routing RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^api/(.*)$ api/index.php?action=$1&%{QUERY_STRING} [L,QSA] AddType application/x-x509-ca-cert .crt