0

I'm having trouble redirecting the www requests to non-www on my Wordpress-based site. The code I used works fine on the homepage, but not on any sub pages.

I'm using the following code taken from this question:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

What am I doing wrong?

Community
  • 1
  • 1
PeterInvincible
  • 2,230
  • 5
  • 34
  • 62

0 Answers0