This is a shared hosting account with HostGator.
I've two .htaccess
files.
One is in the document root: ~/public_html/.htaccess
# this is ~/public_html/.htaccess
## Redirect to https:// ##
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*) https://%{HTTP_HOST}/~myusername/$1 [R=301,L]
The other is in a subdirectory: ~/public_html/software/drupal-7.0/.htaccess
. The contents of this .htaccess
file can be found in the Drupal git.
The function of the .htaccess
in the web root is to redirect all requests to https://
. This works when I visit any URL except for those which are served from ~/public_html/software/drupal-7.0/
.
I want my https://
redirection to work in ~/public_html/software/drupal-7.0/
, as well, without modifying the .htaccess
file which is in this directory.
Moving ~/public_html/software/drupal-7.0/.htaccess
some place else seems to allow the https://
redirection to occur.
Why isn't my redirection occurring in URLs which are served from ~/public_html/software/drupal-7.0/
, please?