Hi Suryansu,
e_screw has given you the right answer for the original issue. It would be best if you open up a new thread for the new question. In this way, our discussion here will not deviate too much from the original issue. This will make answer searching in the forum easier and be beneficial to other community members as well.
For the new issue, I think we can use the statusCode and redirect element in customErrors section. For example:
How to: Create Web.config Files (Visual Studio)
http://msdn2.microsoft.com/en-us/library/k8x4ket8(VS.80).aspx
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
</customErrors>
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.