Oxy
January 29, 2021, 9:09pm
20
IMPORTANT: Make sure that the line RewriteEngine On is not repeated twice. In case the line already exists, simply copy the rest of the code without it.
There are many ways to force www/non www, but this way requires to create /edit .htaccess file (htdocs/.htaccess)
Forcing away from www.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.yoursite.gg [NC]
RewriteRule ^(.*)$ http://yoursite.gg/$1 [L,R=301]
^^ changing that to https forces away from www. and also forces https encryption
Forcing to www.
Its basically the same thing
RewriteEngine on
Rewri…
Is that Wordpress you have up or ??
I think you can simplify everything and open an account on cloudflare
useful to read (why www ?? - there is no point )
hi its me again sorry I always get stuck with something
I turned on cloudflare in my cPanel (I wish I had seen that before I wasted a week trying to install a ssl certificate lol) anyways my site works if I type https://www.lovebug.ml into the address bar
the problem im having is when trying to redirect my site both http://lovebug.ml and http://www.lovebug.ml to https://www.lovebug.ml
I added these lines to the .htaccess file in my site root
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
R…
4 Likes