This WORKS in HTTP. It is IGNORED if I use it on an HTTPS folder and I get a 404 not found for HTTPS://foo.com/user/show indicating that the rewrite never happened.
Please assume: 1) http.conf uses VirtualHost for port 80 and it has been working for years 2) ssl.conf is configured and it works for documents that need no redirect. For example, assume I drop document hello_world.php in the HTTPS folder, I can open https://foo.com/hello_world without problems (do note that this confirms that the rewrite has been ignored!) 3) I have read on the Apache documentation that mod_ssl will take care of unwrapping the HTTPS header and expose the HTTP header (which is what I am counting on) but it does not appear to be happening.
1. Explain what this bit of code is supposed to match...
2. A rewrite cannot rewrite https to https. "https to https" implies two URLs. A rewrite matches a URL request to an internal filepath inside the server. The protocol only has meaning in a URL out there on the web. It has no meaning in file paths inside the server.
3. A redirect redirects requests for one URL to another URL. In that case, both items do have an associated protocol. A RewriteRule with the [R] flag creates a redirect.