[Xitami] want virtual host to point to an executable

Ayhan Tuncer xitami@lists.xitami.org
Mon, 30 Dec 2002 13:35:41 +0200


Marc Doigny wrote:
> 
> >
> >
> >Marc Doigny wrote:
> > >
> > > Hello !
> > >
> > > i have a virtual host and wish to point directly to a executable.
> > >
> > > That is: instead of having to enter
> > > http://my.server.be/redirect?xxx
> > > (redirect is an executable that points to a cable server (no fixed ip))
> > >
> > > i would like something like
> > > http://my.server.be/xxx
> > >
> > > That is the content of the specific cfg file for that VH:
> > > [Server]
> > >      Cgi-bin=webpages/verfaillie.be
> > >      Cgi-url=/
> > >      Default2=index.html
> > >      Webpages=webpages/verfaillie.be
> > > (the root dir is the executable directory and contains only one file,
> > > redirect.exe)
> >
> >
> >I believe naming your executable to the default1 page or vv should work.
> >It works on win32 for me through a cgi-alias but that should not be
> >imperative.
> 
> It works, but i still need a method to get rid of the '?'
> adsl (fixed ip): <http://web.verfaillie.com/invasion>
> cable: <http://web.verfaillie.be/?invasion>
> (same directory, different servers, for some sort of load balancing between
> adsl and cable)

I'm not sure I understand you correctly. Do you wish to redirect a
certain document
to a certain other server/document and again other documents to other
server/document123
or are all the requests regardless of requested document to be
redirected to the same url?

What does the query string parameter "invasion" represent? does the cgi
executable
have to use this parameter to put together the new url it will redirect
the user to?

If latter, you would need to remove the .exe extension from your
executable just as if it
were a directory and pick up the "invasion" from the environment extra
path info.
So you would have to alter the way your executable processes the
parameter. 
Alternatively you could copy your executable as many times as there are 
?invasion -type parameters and rename all these identical executables to
these
specific parameters without the .exe extension - so that they would be
individual 
documents.

It all depends on how you are to use the parameter "invasion".

I hope the above helps.

Ayhan Tuncer