Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Displaying a custom page if procedure fails



9:38 pm on Jan 19, 2004 (gmt 0)

10+ Year Member

I have a simple form on my website which requires the person viewing the page to input their details. Once input they hit the "Go" button and are taken to another screen where they can download the program. At this point I would be sent an email containing their details. What is now happening quite frequently (due apparently to a temporary overload at my webhost) is that they see a "Page not found screen".

The "Go" button is linking to :-


What I would prefer to happen is if the procedure fails then rather than the "Page not found screen" appearing the person viewing the site would see another screen with a button on which links directly to my download file. This way I would lose the personal details of the person but they could still download the program. I would much prefer this situation than them see a "Page not found screen" and perhaps dissapear forever.

Has anyone any idea how this could be done?



2:57 pm on Jan 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I can't see a way of doing it direct from your script, as by the time the error page appears control has been passed from your script to the server.

However, .htaccess files can be placed in any directory and will apply only to that directory and any below it. Maybe you could set up a custom 404 page just for your cgi-bin, with the direct download link on it?


Featured Threads

Hot Threads This Week

Hot Threads This Month