Date:  03/16/2007 08:15:47 AM Msg ID:  003359
From:  Rich Thread:  003357
Subject:  Re: how do i get the URL?
Thank you! That is exactly what I needed.
-- Rich
Sent by FoxWeb Support on 03/15/2007 09:12:12 PM:
Several request variables need to be combined to get the full URL, used for the current request, but from your description, it looks like you may only need to use a fraction of them.  Here's complete code, illustrating all variables:
DO CASE
CASE Request.ServerVariables("HTTPS") = ""
    * Server does not support HTTPS server variable
    IF Request.ServerVariables("SERVER_PORT") = "443"
        UrlString = "https://"
    ELSE
        UrlString = "http://"
    ENDIF
CASE LOWER(Request.ServerVariables("HTTPS")) = "on"
    UrlString = "https://"
OTHERWISE
    UrlString = "http://"
ENDCASE
UrlString = UrlString + Request.ServerVariables("SERVER_NAME") + ;
    Request.ServerVariables("SCRIPT_NAME")
IF Request.ServerVariables("PATH_INFO") <> Request.ServerVariables("SCRIPT_NAME")
    * For script mapped URLs SCRIPT_NAME is usually the same as PATH_INFO
    UrlString = UrlString + Request.ServerVariables("PATH_INFO")
ENDIF
IF NOT EMPTY(Request.ServerVariables("QUERY_STRING"))
    UrlString = UrlString + "?" + Request.ServerVariables("QUERY_STRING")
ENDIF
 
FoxWeb Support Team
support@foxweb.com email
Sent by Rich on 03/15/2007 01:51:55 PM:
We're going to be running 2 websites off the same server, and both will use the same exact set of .PRGs and .DBFs on the server to run both sites.  We're just using a different set of templates for each site. 
I need to be able to read the full URL string when a visitor hits one of our sites so I can determine which set of templates to use.  Is there a cgi.url or cgi.href property I can call?  I need to see which domain name the user came in on.
I am using FoxWeb 2.6.
Thank you!
-- Rich