theRatWonder
04-15-2007, 11:57 AM
Heya.
Is it possible to redirect to a new page but by setting the HTTP headers or maybe something within the apache server I could pass Environment Variables along with it?
For almost all the pages on my site I use no CGI but only html pages with Apache SSI tags to include headers etc.
I have one page that needs to be passed variables from a CGI script, but so I don't have to rewrite the HTML page it would be best if I could leave the server parsing it. Redirecting would see the obvious answer:
my $cgi = new CGI;
print $cgi->redirect('http://mysite.com/page.html');
Cos then the server would parse it, but I need to pass an environment variable somehow so that page.html could pick it up with <!--#echo var="VARNAME" -->.
I tried print $cgi->(-uri=>'http://mysite.com/page.html',-VARNAME=>'hello' but that doesn't work.
Any suggestions?
Is it possible to redirect to a new page but by setting the HTTP headers or maybe something within the apache server I could pass Environment Variables along with it?
For almost all the pages on my site I use no CGI but only html pages with Apache SSI tags to include headers etc.
I have one page that needs to be passed variables from a CGI script, but so I don't have to rewrite the HTML page it would be best if I could leave the server parsing it. Redirecting would see the obvious answer:
my $cgi = new CGI;
print $cgi->redirect('http://mysite.com/page.html');
Cos then the server would parse it, but I need to pass an environment variable somehow so that page.html could pick it up with <!--#echo var="VARNAME" -->.
I tried print $cgi->(-uri=>'http://mysite.com/page.html',-VARNAME=>'hello' but that doesn't work.
Any suggestions?