Is there a way to JUST get the page you access? I know you can use cgi.PATH_TRANSLATED to get you the full server path but I was hoping to find something that just gets the page. It's not a big deal but it would be useful for something I'm trying. (specific page meta data for a variable driven 10 page website).
11/17/2006 10:57:33 AM
perhaps you could use some clever regex to stip just the last file name out of the path
11/17/2006 11:50:32 AM
I'm just going to use the full path translated in the identifying query. Not as sleek as I want but it works. The goal of this was to load up meta data fields with specific information depending on the page. It works well. Check it outhttp://www.ncc-nbaf.org
11/17/2006 2:16:19 PM
nice diagonal gradients[Edited on November 17, 2006 at 3:38 PM. Reason : i can't read]
11/17/2006 3:32:59 PM
you're using some framework built on top of CGI, not "CGI", and not knowing what framework that is pretty much rules out any hope of anyone answering your questionbut to do this in a CGI script or binary application without a framework, you'd find everything you need in the environment variable QUERY_STRING, but of course you'll need to parse it to seperate the path from the paremeters (split at '?', e.g.)
11/18/2006 12:10:36 AM
lol you know what I meant. I thought about parsing it just for the page but it just wasn't worth the time to do it and the fact that it would have to process that every page. Instead I just use the full path. No sense taking an extra step.
11/18/2006 11:44:25 AM
wow, it actually looks pretty clean too, GG Raige
11/18/2006 12:37:11 PM
you want either SCRIPT_FILENAME or SCRIPT_NAMEhttp://www.comptechdoc.org/independent/web/http/reference/httpcgivars.html
SCRIPT_FILENAME
SCRIPT_NAME
11/19/2006 1:24:49 AM
actually yeah QUERY_STRING is wrong, my bad
11/19/2006 9:07:37 PM