@ashish_kamalaksha as said by @konstantyn_diachenko we might need more details..
But few things to look for
More than one rewrite rule matching , for this use L apache flag which marks the rule as last rewrite and doesn't execute subsequent rules
Check if your publish farms are multiple and all ...