I have a question. My Joomla installation makes sure that all transfers are through https istead of http. To rewrite all http to https i use the rewrite conditions below in .htaccess. This works great, however when i go to a page, for example: http://domainname.com/page it redirects to https://domainname.com/index.php. What i want it to do is redirecting http://domainname.com/page to https://domainname.com/page. Same goes for 'www'. Can you please help me with the correct redirects?
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}