anirudh_sml has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Comments on redirection of page
by wazoox (Prior) on Feb 13, 2008 at 14:08 UTC
    What the heck do you want to do? Is your code server side or client side? You should probably have a look at this: How (Not) To Ask A Question.
Re: Comments on redirection of page
by olus (Curate) on Feb 13, 2008 at 18:11 UTC

    If I understand correctly what you are asking, you will want to

    • use CGI on script abc.html
    • Check for the parameters passed to the script and validate them.
    • Log the incident somewhere on parameter error
    • Send an header with a redirect to index.html if the parameters do not validate.

    use strict; use warnings; use CGI; my $q = CGI->new(); my $id = $q->param('id') || 0; my $name = $q->param('name') || ''; my $all_valid = 1; # Apply your rules for parameter validation. # If some is not valid then $all_valid = 0 if(! $all_valid) { # log the information somewhere, file, DB ... # redirect print redirect(-uri => 'xyz.com/index.html', -status => 303 ); exit; } # all is well. Continue processing
    note: The code above is concept. not tested
Re: Comments on redirection of page
by Anonymous Monk on Feb 13, 2008 at 07:26 UTC
    try again