Category Archives: Info

Random bits of information that I had trouble finding on the internet. In hopes that it will be found by googlebot to make it easier for the next person to find it.

Redirecting www.domain.com to domain.com

There are a lot of examples how to redirect http://domain.com to http://www.domain.com, but not the other way around. So without further ado, this is what to put in your .htaccess file, if you want a site hosted by apache to redirect all URLs that start with www to the non-www variant: RewriteEngine On RewriteCond %{HTTP_HOST} […]