|
|
#1 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jul 2004
Hosted on Pipe and Mac
39 posts
Gave thanks: 3
Thanked 3 times
|
[Answered] Internal Server Error for .pl files
When I open the following file:
http://fishy.nu/irssi/beep_beep.pl I receive a 500 Internal Server Error. It seems like the server is trying to read it as cgi. I can rename the file so that it doesn't end in .pl, but is there a way to view it without changing the file extension? For example, I'd like to be able to open it as such: http://irssi.org/scripts/scripts/beep_beep.pl Thanks, Eraemia
__________________
Last edited by Eraemia; March 20th, 2008 at 4:50 PM. |
|
|
|
|
|
#2 (permalink) |
|
Surpass Staff
Comfy Contributor
Joined in Nov 2007
139 posts
Gave thanks: 9
Thanked 13 times
|
There's likely a handler in the .htaccess for irssi.org that forces .pl extensions to be opened as text, is there any way you can check for this handler and copy it over to the fishy.nu server? I would've checked for you, but the sites are not on our network :-(
|
|
|
|
|
|
#3 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jul 2004
Hosted on Pipe and Mac
39 posts
Gave thanks: 3
Thanked 3 times
|
Thanks for your reply.
I googled for how to perhaps edit the .htaccess file to force .pl files to be read as text files. I found this useful website: Stupid htaccess Tricks • Perishable Press (Search for "Instruct server to display source code for dynamic file types") which suggests to add the following code to .htaccess: Code:
RemoveHandler cgi-script .pl .py .cgi 1. How do I implement the code from the website? 2. How do I limit .htaccess to just one subfolder instead of the entire root? Thanks, Eraemia
__________________
|
|
|
|
|
|
#4 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
924 posts
Gave thanks: 2
Thanked 91 times
|
In the folder that contains the .pl files you want displayed as text, make a .htaccess file containing the following and upload to that directory:
Code:
RemoveHandler .pl AddType text/plain .pl Do not add or alter the .htaccess file in the public_html directory, unless, you want site-wide changes.
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|
|
#5 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jul 2004
Hosted on Pipe and Mac
39 posts
Gave thanks: 3
Thanked 3 times
|
Thanks, that worked perfectly!
![]()
__________________
|
|
|
|