I have the an spa running on heroku and I wanted to get it running on forced https. I'm using the PHP stack to have some basic authentication on it, nothing special only one index.php. Thought it should be easy, but I have a strange redirect there: When I access /appStart for example, I get this in logs:
10.8.149.25 - - [13/Feb/2021:19:23:57 +0000] "GET /appStart HTTP/1.1" 301 248 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
this is my .htaccess:
RewriteEngine On
#Force SSL
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=302]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_URI} !\.(png|css|js|json|txt|ico)$
RewriteCond %{REQUEST_URI} !_nuxt
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
I switched the https rewrite to 302 in my .htaccess to be sure that the redirect isn't comming from my rules, so ... Where is this 301 coming from???