Friday 30 July 2010

Customising InternalError.asp

If you want to customise InternalError.asp and place a copy in CustomUpdate (as you would with other files) and you change the path of the error page (under the trunk Advanced Settings) to this new file, you will find you get an HTTP 500 error. Remember when entering the path in the Advanced Settings that it (bizarely) requires /InternalSite/CustomUpdate/InternalError.asp

You need to do two things to get this to work

- In the URL Set tab of the trunk Advanced Settings, browse down the rules until you find the InternalSite rule for InternalError.asp. Change the rule from /internalsite/internalerror\.asp to read /internalsite/(customupdate/)?internalerror\.asp
[if you have renamed InternalError.asp, make a copy of the rule above instead of editing it, put it under the one above, and amend the file name too. The out-of-the-box rules do not allow you to change filenames of most files]

- the InternalError.asp page references the files in InternalSite\inc directly. This means that when run it cannot find any of the inc files it needs. The answer is to create a 'symlink' - which is a very UNIXy thing to do but it possible in Windows too. Open a command prompt in Administrator mode, and change directory to [your UAG directory]\von\InternalSite\CustomUpdate. Run the command 'mklink .\inc ..\inc'

Apply your config and this should now work

No comments: