1
I’m trying to understand a little about the file . htaccess but I can’t merge two rules.
This is the one I use for the slim framework.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
And that’s the new one I’d like to add after this:
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
But when I put one after the other the server pops an error. I’ve tried this way too, but so the first rule stops working...
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Would anyone have any suggestions?
Read the two answers to this question What Rewritecond and Rewriterule means in a. htaccess file? who will help you.
– Augusto Vasques