I’m trying to redirect all requests for subdomain.example.com to http://www.example.com
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Seems to cause a 500 internal server error as does
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
So my question is why are these failing and how do I fix it?
After your first two lines, add: