I've recently got a new client and I converted their html files to shtml pages, and everything works great except the 404.shtml that calls on a new .pl file to this portion of the script via
<!--#include virtual="cgi-bin/check.pl" -->
here's the snip from the check.pl file
$page=$ENV{'REQUEST_URI'};
if ($page =~ /a\.html/) { $p="a.shtml"; }
elsif ($page =~ /b\.html/) { $p="b.shtml"; }
elsif ($page =~ /c\.html/) { $p="c.shtml"; }
elsif ($page =~ /d\.html/) { $p="d.shtml"; }
else { print header( -Refresh => "5; URL=http://foobar.com");
if ($p) { print header; printnewsite(2, $p); } else
{ printnewsite(1); }
If I use the "header( -Refresh" method, the script does not refresh through the shtml, but is ok if I go to it directly.
If I use the
start_html(-head=>meta({-http_equiv => 'Refresh', -content=> '5; URL=http://someurl//thiscode.pl'})); it will work ok either way; however, I've allready established a set of html, head, title, and body tags for the
printnewsite(); sub, so I get two sets when i use
print start_html(); which is not a good thing.
I've also used the
print redirect();, it fails just like the
header(-refresh.
Is there something I can do that will work with an shtml or am I missing something else here?
Thank you in advance.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.