You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by George Gallen <gg...@slackinc.com> on 2002/05/16 23:39:11 UTC

Running a .cgi as your index.html page...

Here's what I want to do:

I want to return a different "index.html" depending on my URL.

I will be referencing as http://my.host.com/?keyname

I will have a cgi, then read "REQUEST_URI" env variable, strip
out whatever is after the ? and depending on the keyname
return the appropriate menu, if no keyname (that is no ?) is supplied
return a choice menu.

Right now, my index.html consists of:

<HTML>
<HEAD><TITLE></TITLE>
<TITLE></TITLE>
</HEAD>
<BODY
OnLoad="window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHei
ght); FCHILD.submit();">
<FORM NAME='FCHILD' ACTION='cgi-bin/authenticate.cgi' METHOD='POST'>
<INPUT TYPE = "HIDDEN" NAME="PROGRAM" VALUE="index.html">
</FORM>
</BODY>
</HTML>
(yes, I know the above is for IE only...not a problem, IE is only used for
this application)

basically, it forces a form submit which loads up a secondary
authenticatation routine

Which works fine. But the problem here is the REQUEST_URI from the original
login
will be lost.

So, I'd rather have the secondary authentication routine run as my default
index.html

How would I set that up?

Any Ideas.

Thanks
George