I have an issue on my website, where all http URLs redirect to the https of the homepage. For example,
http://example.com/ppc-services/ redirects to https://example.com/
I have added this to .htaccess but didn't work
# Redirect to HTTPS
RewriteCond %{HTTPS} =off
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]
I had also tried the following, but no luck:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Could someone help me?