https – N77 Design | NickClaeboe.com https://www.nickclaeboe.com Atlanta Web, Graphic & Flyer Design • Design Portfolio & Rates for Nick Claeboe Custom Design Work Wed, 03 Mar 2021 14:28:24 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://www.nickclaeboe.com/wp-content/uploads/2016/05/favicon-60x60.png https – N77 Design | NickClaeboe.com https://www.nickclaeboe.com 32 32 Set .HTACCESS File To Force NON-WWW SSL HTTPS https://www.nickclaeboe.com/2016/09/24/set-htaccess-file-force-non-www-ssl-https/ Sat, 24 Sep 2016 12:36:42 +0000 http://www.nickclaeboe.com/?p=427

I often come across sites that need SSL but require the path to be force with NON-www.

Below is a handy snipped of code to place in your root folder in the .htaccess file. You can simply copy this code and paste it in to force all incoming urls to drop www and only use non-www urls, e.g.: https://sitename.com.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)(.+) [OR]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?(.+)
RewriteRule ^ https://%2%{REQUEST_URI} [R=301,L]

]]>