Are you saying the code sample posted in the link does not work for you or it doesn't work after you adjusted it trying to making it work for your needs?

I see nothing in the posted code that would cause an error and it isn't using anything that shouldn't be on the server. When you say an internal error I assume you are talking about a 500 error. If so, maybe this link can help you track it down. Creating Custom ASP Error Pages

If you are have a problem with a modified version of the file then try posting it and I'll take a look.