![]() |
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! |
ya very easy
Code:
#!/usr/bin/perl |
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! |
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 |
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.
|
Ok cool, thats what i thought, Just wanted to make sure!
Chmod 755 correct? Again thanks guys! EDIT: CHMOD 755 and it isnt working, |
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. |
Yes i did check the path. it is the same as other working perl on the site
the error msg is 404 |
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. |
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: Also, be sure you FTP'ed it to your server in ASCII mode. Sending it in BINARY mode will break it. |
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! |
yes, but CGI.pm outputs the corect status codes. whereas the second exg gives TMTOWTDI at its prime. oh and dont mind me i am just being padantic.
|
why do simple things allways turn out o be funny? LOL
Thanks again guys! ...LOL |
All times are GMT -8. The time now is 04:47 PM. |
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