Redirecting http to www and https page

Edit .htaccess as follows:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$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 ^(.*)$ https://www.yourdomain.com/$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

Napsat komentář

Vaše e-mailová adresa nebude zveřejněna.