in reply to Re: How do I link in CGI?
in thread How do I link in CGI?

E-Bitch, I have a script that allows users to authenticate, once authenticated/not authenticated users need to be linked to either an error message or an appropriate place. Currently, I am able to get the user to authenticate, however once they do that, they just a message stateing XYZ. Rather that getting that message, I want the user to go somewhere else, lets say, "authenticated.htm". hope this is clearer. Thanks P.A.P

Replies are listed 'Best First'.
Re: Re: Re: How do I link in CGI?
by sierrathedog04 (Hermit) on Jul 12, 2001 at 05:39 UTC
    If you are using basic authentication on the Apache webserver then what you are asking is not possible without recompiling Apache to support custom authentication.

    Apache pops up a little dialogue box when you log in. If your login fails then nothing happens. If your login succeeds then you go where you want to go.

    Those are your choices. If you want a customized error screen you are out of luck unless you recompile.

Re: Re: Re: How do I link in CGI?
by E-Bitch (Pilgrim) on Jul 11, 2001 at 23:46 UTC
    Unfortunately, I am rather unfamilar with CGI, but I do know (or think I know) that that would be a redirect (i think). I know with JSPs that you can use response.sendRedirect("somepagehere") (or something similar). I would be surprised if CGI coudnt do the same thing. Anybody help out and confirm this?


    thanks!
    E-Bitch
    adendum: or better yet, you could shoot out a meta redirect tag like this:

    <META HTTP-EQUIV='refresh' CONTENT="0;URL='http://www.whatever.com/sub +mitsuccessful.html'">

    in the head. Its a bit of a hack, but it would work.