Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect to cgi exe

Status
Not open for further replies.

Tracey

Programmer
Oct 16, 2000
690
NZ
hi

i have a problem which i dont seem to be able to work out.

I need to be able to redirect my root web address url to a script within my cgi-bin. eg:
would go directly to
i have managed to get that to work via :
ScriptAlias / "c:/apache/cgi-bin/etime.exe"

however all my other relative links to the root directory, icons, .js files etc no longer work.

is there anyway i can redirect users to this application without loosing my relative paths within my application?
I also need to be able to enter " to gain access to another program running on this server.

i tried also "redirect" but this caused some major endless looping.

can anyone here help me? I use Apache 2.0.36 on windows 2000

[cheers]
[hippy]

Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
You might use mod_rewrite.

RewriteEngine on
RewriteRule ^/$ /cgi-bin/etime.exe [R,L]

This will redirect the browser to your executable.

If you do not want the browser's URL to change, and if you have the proxy module available on your installation, you can use:

RewriteEngine on
RewriteRule ^/$ /cgi-bin/etime.exe [P,L]

This will cause Apache to invoke the executable internally and provide the output to the user without moving the target of the browser.

For more information:

Want the best answers? Ask the best questions: TANSTAAFL!!
 
thanks for answering sleipnir,

I havent tried your solution, because i devised a work-around. (javascript in default.htm to relocate window)
also because as yet i have not managed to successfully include any modules (i tried for some time with php but gave up).







Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top