I am trying to force redirect my non http and non www site to https with www.
My .htaccess
file code is this
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Also the rewrite mode is enabled on the server and in apache2.conf file AllowOverride
is set to ALL
But the redirect is not happening. Can any one tell me where i am doing wrong ?