Gossamer Forum
Home : Products : Links 2.0 : Discussions :

redirect.pl

Quote Reply
redirect.pl
redirect.pl for webcrawler drop-down menu.
Hello everyone,
I can't get my redirect.pl to call the default "missing.htm" page.
If I imput the redirect.pl url in my browser --> it works fine! it calls up the default page. But when I use the drop down menu, it wont't go to my default.htm instead it gives your generic can't find page.
I've triple check everthing and can't find the problem.

This is my redirect.pl

#!/usr/bin/perl
$default='http://www.qdice.com/missing.htm';

@tmp=split(/=/,$ENV{'QUERY_STRING'});
$url=$tmp[1];

if($url =~ /\&x/)
{
$url =~ s/\&x//g;
}

if($url ne "")
{
$url =~ s/\+/ /g;
$url =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$url =~ s/~!/ ~!/g;
$url =~ s/\%2F/\//g;
}
else
{
$url=$default;
}
print "Location: $url\n\n";
exit 0;

Here is my drop-down menu:
<td align=RIGHT nowrap>
<form method="get" action="http://www.qdice.com/cgi-bin/redirect.pl" name="">
<div align="center">
<p align="right">
<select name="select" size="1">
<option value="/">Selecciones Preferidas</option>
<option value="http://www.qdice.com/mitierra1.htm">Mi Tierra</option>
<option value="http://www.qdice.com/mail1.htm">Email Gratis</option>
<option value="http://www.qdice.com/ipostales">iPostales</option>
<option value="http://www.qdice.com">Lo Nuevo</option>
<option value="http://www.qdice.com">En Vivo!</option>
<option value="http://www.qdice.com">Qdice.com</option>
</select>
<input type="submit" value="GO!" >
</p>
</div>
</form>
</td>

Thank you in advance to anyone that may help,Pat//



------------------
P.Espinoza
Qdice.com
Quote Reply
Re: redirect.pl In reply to
Put the full URL for the default page.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: redirect.pl In reply to
Eliot, thank you for taking the time to help me. Where should this full URL should go ?
the above script begins and has the full URL ?? could you further explain ?
thank you//
Quote Reply
Re: redirect.pl In reply to
Ah...no it doesn't! Having a forward slash is only the directory!

Replace the following codes:

Code:
<option value="/">Selecciones Preferidas</option>

with the following:

Code:
<option value="http://www.qdice.com/">Selecciones Preferidas</option>

Don't know how to make this more clear.

Goodbye.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------