
Dingo
Novice
Nov 8, 2010, 10:05 AM
Post #1 of 5
(365 views)
|
|
Address showing redir.pl not true url
|
Can't Post
|
|
I'm having what I hope is a simple problem with an HTML dropdown that calls a perl script. Here is a link to my test page. http://www.phoenixarizonanetwork.com/test.htm When I make a choice it goes to the page fine. However in the address bar of the browser it shows the perl link, not the true url. For instance if I click dogs I get this URL in the address bar. http://www.phoenixarizonanetwork.com/cgi/redir.pl Not http://www.phoenixarizonanetwork.com/dogs.htm How can I make it show the true address, not the perl link? I'm not sure if my code matters but here is my perl script. #!/usr/bin/perl sub xcgi_InitForm { my($h) = '[a-fA-F0-9]'; my($buff, @params, $param); my($param_name, $param_value); local(*xcgi_form) = @_ if @_; read(STDIN, $buff, $ENV{'CONTENT_LENGTH'}); @params = split(/&/, $buff); foreach $param (@params) { ($param_name, $param_value) = split(/=/, $param); $param_value =~ tr/+/ /; $param_value =~ s/%($h$h)/pack("C",hex($1))/eg; $xcgi_form{$param_name} = $param_value; } } { my(@form); xcgi_InitForm(*form); $url = $form{'url'}; print "Location: $url\n\n"; }
|