I have tried the following in the .htaccess file for the root of my site: RewriteCond %{HTTP_HOST} ^domain.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] When I do this, it works great and does what I want with one exception. I have several <img> tags in my website and when the src attribute uses a single quote instead of a double quote it seems to not want to let the rewrite of the pictures address work. Does anyone have a suggestion of what to do. I know all of the pictures that I want to just have it ignore are in the images directory, plus some other directories under that.
I don't know what you are trying to do with that code, but you might find an answer here http://www.mod-rewrite.com/forum/