I know this overall topic has been beaten to death but please read the problem carefully first. After hours of Googling I am giving up. I have found things that are close but not IT
PROBLEM: I need to rewrite (mind the protocol!)
HTTPS://foo.com/user/show.json
to
HTTPS://foo.com/index?my_tag=user/show.json
I can do this easily if I am using
HTTP, for example, via .htaccess and mode rewrite
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?my_tag=/$1 [L,QSA]
This WORKS in
HTTP. It is IGNORED if I use it on an
HTTPS folder and I get a 404 not found for [
foo.com...] 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 [
foo.com...] 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.
Help please.
running:
CentOS
Apache2
OpenSSL 0.9.8e
PHP 5.2.17