I have uploaded a wordpress website to Google Cloud Platform using a VM instance.
I have made the redirection of http to https . Although I can not make the redirerction of www to https, using the method of .htaccess
Can anyone help me out?
Thank you in advance!
CodePudding user response:
I found the solution.
I have made a Page Rule inside cloudflare and I redirect all the traffic from WWWW to non-WWW .
So it is solved.
CodePudding user response:
Change with the following
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [L,R=301,NC]