Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 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!
Sexodus is offline  
Old 03-19-2004, 11:52 PM   #2 (permalink)
Upright
 
Location: BC, Canada
ya very easy
Code:
#!/usr/bin/perl
use CGI;
$query = new CGI;
print $query->redirect('http://www.sotg.us/chat/cgi-bin/yabb/YaBB.pl');
make shure that you change the path to perl.
__________________
- 42 -
ni42 is offline  
Old 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..
Sexodus is offline  
Old 03-20-2004, 10:12 PM   #4 (permalink)
I am Winter Born
 
Pragma's Avatar
 
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!
Pragma is offline  
Old 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 -
ni42 is offline  
Old 03-21-2004, 03:44 PM   #6 (permalink)
Banned
 
Location: The Canyons - Boarding
Ok cool, thats what i thought, Just wanted to make sure!

Chmod 755 correct?

Again thanks guys!

EDIT: CHMOD 755 and it isnt working,

Last edited by Sexodus; 03-21-2004 at 03:53 PM..
Sexodus is offline  
Old 03-21-2004, 09:39 PM   #7 (permalink)
Upright
 
Location: BC, Canada
1. did you change your path to perl?
2. that chmod should work.

if you could post the error msg, there might be something else that could be done.
__________________
- 42 -
ni42 is offline  
Old 03-21-2004, 09:59 PM   #8 (permalink)
Banned
 
Location: The Canyons - Boarding
Yes i did check the path. it is the same as other working perl on the site

the error msg is 404

Last edited by Sexodus; 03-21-2004 at 10:02 PM..
Sexodus is offline  
Old 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 -
ni42 is offline  
Old 03-24-2004, 04:05 PM   #10 (permalink)
Darth Papa
 
ratbastid's Avatar
 
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";
Also, be sure you FTP'ed it to your server in ASCII mode. Sending it in BINARY mode will break it.
ratbastid is offline  
Old 03-24-2004, 04:42 PM   #11 (permalink)
Banned
 
Location: The Canyons - Boarding
Thanks it is now fixed! i worked on it and i think it was the ASCII. I was uploading in Auto!

Thanks it is now fixed!
AGAIN Thank you ni42, ratbastid, and pragma!
Sexodus is offline  
Old 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
whereas the second exg gives TMTOWTDI at its prime. oh and dont mind me i am just being padantic.
__________________
- 42 -
ni42 is offline  
Old 03-25-2004, 02:07 PM   #13 (permalink)
Banned
 
Location: The Canyons - Boarding
why do simple things allways turn out o be funny? LOL


Thanks again guys!


...LOL
Sexodus is offline  
 

Tags
page, pearl, redirect, web


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 09:28 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54