Note: I cannot be root on example.com, so editing httpd.conf isn't an option.
I want anything from http://example.com to redirect to be https and including the slash directory. This is an example of the problem. The same problem if it is http://www... or http://example.com...
If the URL looks like this:
http://www.example.com/suggestions
It incorrectly redirects to the home page:
https://www.example.com/index.php
When the desired result is for it to redirect to here:
https://www.example.com/suggestions
Here is the .htaccess code I'm using:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]