Hello Monks,
Ok, i'm sure i'm just having a brain fart OR its simply not possible to do what i'm trying. The redirect simply doesn't happen with either IE9, Google Chrome or FireFox. So I suspect its a limitation that a page can't redirect?
I'm trying to redirect to index.shtml if the user requests the welcome page without being authorized first. The same redirect method works when delivered from a perl script directly
My welcomeV01.pl simply contains this:
my $URL = "http://localhost/index.shtml"; print "Status: 302 Found\n"; print "Location: $URL\n\n"; exit;
My welcome.shtml page simply contains this:
<!--#include virtual="/cgi-bin/welcomeV01.pl"-->Thank-you kindly in advance :) *bow*
(Apache server, no errors in logs, perl is functional as i'm using it for other scripts on the same server)
SOLUTION: After a couple hours of searching google for more info on methods of accomplishing this, the idea popped into my head to use .htaccess ModRewrite to redirect all calls to welcome.shtml, directly to the welcome.pl script instead. It is working thus far, allowing me to supply content based on the client being authorized
Necessary .htaccess file changes: RewriteEngine on RewriteRule welcome.shtml /cgi-bin/welcomeV01.pl [L] Perl file code: my $URL = "http://localhost/index.shtml"; print "Status: 302 Found\n"; print "Location: $URL\r\n\r\n"; exit;
Thank-you very much for your help Monks, asking the questions here allowed me to break my thought cycle and move forward
In reply to HTTP Redirect from SHTML page by Inexistence
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |