RewriteCond %{SERVER_PORT} !^443$
RewriteRule MATCHME https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
IF MATCHME is not in the URL then will the RewriteRule NOT Be processed? Could you link me to some documentation?
That is correct. If the pattern MATCHME is not present, no rewriting will take place.
If you require a catch-all rule to be matched when your RewriteCond is active, you can specify an additional rule like:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule MATCHME https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
# Catch-all rule
RewriteRule ^(.*)$ https://%{SERVER_NAME}/someotherpage [L,R,QSA]
Review the mod_rewrite documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With