I want to redirect all the WordPress urls of the form
http://example.com.previewdns.com/my-favorite-post/
to
http://example.com/my-favorite-post/
I am trying to do this with the below .htaccess code.. But its not working
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^example.com.previewdns.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
Please help