Redirecting http to www and https page

Edit .htaccess as follows:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [R=301,QSA,L]

It helped me to show icons on the front page correctly at a site running wordpress.

And add these below in order to recirect http to https page.

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$$1 [R=301,L]

And for hiding index.php in the url

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

Redirect to subdirectory

RewriteRule ^(/)?$ puvodni