If the URL is to be embedded in the output of the script, then you only need to use a relative URL, by including the script name, as described in the Locating and Addressing Scripts topic of the FoxWeb documentation. If on the other hand you need to use a full URL, you can use the following code:
This code has been tested with IIS. If it does not work with Apache, then you may want to try using just the PATH_INFO variable.
Sent by Alan Harris-Reid on 11/26/2002 07:01:53 PM:
I am trying to include a self-referencing URL within a .fwx script using Request.ServerVariables('script_name'). Under IIS this works fine and the function returns 'MyScript.fwx', but when I run the same script under Apache it returns 'cgi-bin/foxweb.exe', which is no good to me at all!
Any ideas how to solve this problem would be appreciated.