http://www.perlmonks.org?node_id=371190


in reply to Rebuilding GET Parameters without ENV{'REQUEST_URI'}

If you are able to use the CGI.pm module, it has a method called self_url which will give you the results that you are after (not having used IIS, I can't be possitive these methods will work under IIS).

Search through the CGI.pm docs for "CREATING A SELF-REFERENCING URL THAT PRESERVES STATE INFORMATION" for more information of how to build URLs based on the current request.

- Cees