Getting an Error “You have attempted to access a restricted URL” while accessing an application published through Forefront Unified Access Gateway

Recently, I worked on a case where the customer had published multiple web applications using the template ‘Other Web Application (Application Specific Hostname)’.  The application type was specified as “web”.  When users accessed some of the applications, it worked but while accessing the rest, they were getting the error “You have attempted to access a…