<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
i am using these codes. BUt it only works for the home page. But it doesn't work for the other pages. for eg.
if i go for
http://mysite.com/1 , then it doesn't redirect me to
https://www.mysite.com/1
how can i solve this problem?