I'm currently hosting a PHP application on Apache. This application is behind a CloudFront distribution that sends all requests with cms/* to my application.
I used the following .htaccess file and hoped to make things work:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /cms
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
I get an Internal Server Error and in the Apache Error logs this can be found:
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error.
What am I doing wrong?