Reputation: 18338
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?
Upvotes: 3
Views: 1821
Reputation: 270757
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.
Upvotes: 2