I keep reading that, where possible, I should not be using mod_rewrite
. As such, I am trying to do a http to https rewrite with RedirectMatch.
Question: How can I use RedirectMatch
and use Apache server variables (such as %{HTTP_HOST}
) in the URL parameter?
This code fails to return a response to the client (Chrome):
RedirectMatch ^(.*) https://%{HTTP_HOST}/$1
I recently asked a similar question to this, but it may have been too wordy and lacks direction for an answer: Redirecting http traffic to https in Apache without using mod_rewrite
mod_rewrite
it is! – Asco