I'm using #!/bin/sh as my language.
Asked
Active
Viewed 134 times
2 Answers
2
Doing a redirect would be easy. Just return the right HTTP header like:
Location: http://www.w3.org/pub/WWW/People.html
The problem is that the user will see the URL change in their browser.
Technically "forward" is a internal redirect which is normally supported by your "framework" (ie the Servlet API that you specified). I guess to get an "internal forward" to work in #!/bin/sh you would need to do something like this (psuedocode)
# before i've printed anything to the output
if "should i forward"
my_other_cgi_page.sh
exit
fi

mlathe
- 2,375
- 1
- 23
- 42
0
I guess just call that like
myURL
because all CGI data will be in the environment variables (not sure about POST request though)

catwalk
- 6,340
- 25
- 16