03-19-2004, 09:18 PM | #1 (permalink) |
Banned
Location: The Canyons - Boarding
|
Redirect web page in Pearl (.pl)
ok this is link
http://www.sotg.us/board/cgi-bin/yabb/YaBB.pl However i have installed new boards into http://www.sotg.us/chat/cgi-bin/yabb/YaBB.pl Old is Board New is Chat ok simple? LOL what i want to do is make it so if people go the board link (like in favorites or something) it redirects them to the Chat folder There should be some simple code i can copy into a new text.doc and save it as YaBB.pl to work rght? Please show me the way. Thanks Sx P.S. Bill O'Rights Thanks for the help a while back even though you wernt able to! what had happend was he changed the CHMOD on all the folders in the site! |
03-20-2004, 08:33 PM | #3 (permalink) |
Banned
Location: The Canyons - Boarding
|
when you say make sure i change the path to perl, are you talking about the:
#!.. part or something else? BTW Thanks. P.S. I copyed and pasted that into a new Text. Then saved it as YaBB.pl and uploaded it. However it didnt take! Last edited by Sexodus; 03-20-2004 at 08:35 PM.. |
03-20-2004, 10:12 PM | #4 (permalink) |
I am Winter Born
Location: Alexandria, VA
|
Make sure you mark it as executable (chmod a+x filename.pl) so that it knows that it's not plain text.
And yes, the path to perl is the shebang (#!) portion. If, for example, your server's perl binary is located in: /usr/local/bin/perl Then the first line of your perl script must be: #!/usr/local/bin/perl
__________________
Eat antimatter, Posleen-boy! |
03-21-2004, 03:28 AM | #5 (permalink) |
Upright
Location: BC, Canada
|
what pragma said is absoultly corect. if you are having problems finding your path to perl. have alook at some of your other perl scripts, and just copy the path to perl from them. just upload it like you would any other perl script.
__________________
- 42 - |
03-22-2004, 11:30 PM | #9 (permalink) |
Upright
Location: BC, Canada
|
404 means that the file can not be found.
now the question is if it means the perl script or the file the perl script is redirecting to. if you have access to the web server logs you should be able to tell that. if it is the first case, check that you put the perl script in the place that you thought you put it in and check the url you are typing in to get to the test perl script. if it is the 2ed, check the url in the perl script to make shure it is redirecting to the right place. other then that i can not think of anything other that might be wrong.
__________________
- 42 - |
03-24-2004, 04:05 PM | #10 (permalink) |
Darth Papa
Location: Yonder
|
Oh geez. Let's not bring in the multi-thousand-line CGI.pm module for what's fundamentally a one-liner. I mean, I know this thing'll be run once every blue moon or so, but I object to the code above for purely aesthetic reasons.
Once you get your 404 issues solved, recode it to be: Code:
#!/usr/local/bin/perl print "Location: http://www.sotg.us/chat/cgi-bin/yabb/YaBB.pl\n\n"; |
03-25-2004, 01:39 AM | #12 (permalink) |
Upright
Location: BC, Canada
|
yes, but CGI.pm outputs the corect status codes.
Code:
Status: 302 Moved Location: http://www.sotg.us/chat/cgi-bin/yabb/YaBB.pl Code:
Location: http://www.sotg.us/chat/cgi-bin/yabb/YaBB.pl
__________________
- 42 - |
Tags |
page, pearl, redirect, web |
|
|