Aw, if the www and non-www'd domains are co-located (as they usually are), then the correct code above (cprado) will generate an endless loop. That's where the power of mod_rewrite comes in: Check whether www or non-www and redirect the non-www to the www'd URL, i.e.,
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^davidclick\.com$ [NC]
RewriteRule .? http://www.davidclick.com%{REQUEST_URI} [R=301,L]
All this is in the tutorial linked in my signature so I'd recommend reading to know why this is the code (see Sample Code - force www) to use.
Regards,
DK
Bookmarks