Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed the invalid section, HTTP_HOST isn't expanded

...

No Format
   Redirect permanent / https://secure.example.com/

Using

...

When the requested Host: header is unknown ahead of time, we can use the following trick to build the target URL dynamically. Using Location instead of LocationMatch avoids the overhead of PCRE.

Code Block
languagetext
<Location />
  Redirect permanent "https://%{HTTP_HOST}/"
</Location>

Using .htaccess files and redirect

...