Redirect www to non-www htaccess

This is what you want:

RewriteEngine On
RewriteCond %{HTTP_HOST} website\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://website.com/$1 [R,L]

@elgoots, the reason yours was close but still had trouble is your HTTP_HOST has the www in it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)