PDA

View Full Version : domain.com --> www.domain.com rewrite



izwar
11-27-2006, 10:55 AM
Hey, what is the command for the rewrite in the .htaccess that i have to use for when someone goes to

widgets.com for it to redirect to www.widgets.com.

stymiee
11-27-2006, 01:23 PM
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

izwar
11-28-2006, 09:40 AM
awesome thanks, worked like a charm