Skip to content

How to redirect pH7CMS from www to non www

Tom Hepburn edited this page Apr 19, 2019 · 4 revisions

To redirect automatically your website from the "www" to "non-www", please uncomment these two(2) lines .htaccess#L660-L661

NOTE: Uncomment means to remove the hash `#` ([number sign](https://en.wikipedia.org/wiki/Number_sign)), which starts the line.
So, line L660 to line 661 should look like:
```
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
```

Done! 😊

P.S. If you have any issues, please ask your web hosting company, or see if there is an option for doing it in your web hosting control panel (such as cPanel or Plesk).