Forum Moderators: phranque
RewriteCond %{HTTP_HOST} ^example.net$ [OR]Yup, that's what you're telling it to do. You've captured the request, but you forgot to put the capture into the target as
RewriteCond %{HTTP_HOST} ^www.example.net$
rewriterule ^(.*)$ http://www.example.com [R=301,L]
However when I go to example.net/any-valid-page-url it takes me to www.example.com and not example.com/any-valid-page-url
RewriteCond %{HTTP_HOST} example\.net
without anchors. You should escape the period as \. but in this situation it's a non-lethal error. Is this in the same htaccess file that contains your example.com files? If no other hostname uses this htaccess, you don't need a condition at all.
RewriteCond %{HTTP_HOST} example\.net
without anchors?