Query parameters in permalinks not being supported while redirecting

In our old forums we are having URLs for our posts like.
www.somesite.com/12/title-of-the-topic/topicid.aspx#123
In the above link #123 was the post id.
When we are creating a permalink for the post using the above url, the redirection is not happening.
Is there any way to overcome this issue.