http to https htaccess always redirecting to home page I have found following .htaccess code on stackoverflow.com to convert the http requests to https

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


it is converting the http to https but always goes to the home page

suppose If I am trying to go to http://domain.com/about-us it routes me to https://domain.com

Just for information I am using redirect and global redirect module but even if I am disabling them both the result is same.
By default, Drupal includes an .htaccess file that has instructions in the comments for doing https redirection.  I suggest you follow the instructions in that file.

From Drupal 7.22:

# Various rewrite rules.
&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on

  # Set "protossl" to "s" if we were accessed via https://.  This is used later
  # if you enable "www." stripping or enforcement, in order to ensure that
  # you don't bounce between http and https.
  RewriteRule ^ - [E=protossl]
  RewriteCond %{HTTPS} on
  RewriteRule ^ - [E=protossl:s]