URL Mapping - ApacheCon 2005
Redirecting your site to https
    
     RedirectMatch (.*) https://other.server.com$1
    
      
  • Redirects any URL to that same URL, but on the https server.

  • Note that this will loop if you're not careful. This RedirectMatch should go into the http-only vhost.

  • Or you can do it with mod_rewrite

    
      RewriteEngine On
      RewriteCond %{HTTPS} !=on
      RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
    
      

Index
Back to Redirect examples
Forward to RedirectTemp and RedirectPermanent

ApacheCon 2005 : URL Mapping - Slide #17 of 45