Although Your Mother's suggestion to use the webserver is probably better, here's a quick replacement site.pl, I hope it's obvious how new URLs can be added:
#!/usr/bin/perl use warnings; use strict; use CGI qw/param redirect/; my %REDIRECTS = ( 'abc' => 'http://yoursite.com/abc.html', 'def' => 'http://yoursite.com/def.html', ); my $NOT_FOUND = 'http://yoursite.com/page_not_found.html'; my $dest = param('keywords') && $REDIRECTS{param('keywords')} ? $REDIRECTS{param('keywords')} : $NOT_FOUND; print redirect(-uri=>$dest,-status=>'301 Moved Permanently');
In reply to Re: Redirect a cgi URL
by Anonymous Monk
in thread Redirect a cgi URL
by lukebarber
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |