What is Wrong In this 301 Code

moneyflower

Power Member
Joined
Jan 22, 2016
Messages
618
Reaction score
206
Hello Fellow Blackhaters,

I want to do a 301 from a particular domain to a post of a diffrent domain, and so I used this code:

RewriteEngine on

RewriteRule ^/file\.html$ - [L]

RewriteRule (.*) http://mynewdomain.com/mynewpost. [R=301,L]


But the Problem is that it keeps redirecting to the homepage of the new domain and not to the post page.


Thanks in advance
 
Back
Top