I am using html5 boilerplate and I am attempting to test if my htaccess is working correctly. After I key in www.domain.com into chrome or opera it doesn't redirect. I am thinking maybe case some browser gimmick though, much like how Chrome hides the http:// despite the fact that its there.

I've checked using chrome dev tools and firebug, and underneath the request headers it shows whatever I type in because the "Host"... both with www. and without them... and so i dont fully realize if it is working

# ----------------------------------------------------------------------
# Suppress or force the "www." at the beginning of URLs
# ----------------------------------------------------------------------

<IfModule mod_rewrite.c>
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>

The rule is alright.

Book the next:

  • Have you enabled mod_rewrite inside your .htaccess via RewriteEngine On?
  • Is mod_rewrite module loaded in Apache whatsoever? Try moving your instructions outdoors of <IfModule mod_rewrite.c> to ascertain if it'll generate any server errors (indication that mod_rewrite isn't loaded).
  • See if .htaccess is permitted for use.

Regarding world wide web or non -- see these subjects on Website owners a part of StackExchange: