Forum Moderators: phranque
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
It doesnt give me any errors at all, just doesnt work.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.domain\.com
rewriterule (.*) [domain.com...] [R=permanent,L]
Yes, you don't need multiple ones.
> the domain has a couple of hyphens in it, do these need to be escaped aswell?
... not that I know ...
Do you have more rewite rules above your code terminated with [L], which already have been applied, so this new rule would not be reached at all?
Sorry, no more ideas here.
Regards,
R.