Forum Moderators: phranque

Message Too Old, No Replies

Internal Server Error Produced by .htaccess

         

grunshaw

12:38 pm on Mar 13, 2008 (gmt 0)

10+ Year Member



Hello
I have installed a script that uses .htaccess files to control it. It calls other php3 files that contain variables to produce forced headers and footers for users that signup for a free account. <snip>

I have installed the script correctly and followed everything - but when a user signs up, their website <snip> produces an internal server error. It creates the directory and places the html file within it quite happily. Here is the .htaccess file located in the /users/ directory above public_html

----
AddHandler headerd .gif
AddHandler headerd .jpg
AddHandler headerd .bmp
AddHandler headerd .png
AddHandler headerd .txt
AddHandler headerd .css

Action headerd /users/head.php3

AddHandler headered .htm
AddHandler headered .html
AddHandler headered .php

Action headered /users/header.php3

AddHandler zippo .zip
AddHandler zippo .exe
AddHandler zippo .rar
AddHandler zippo .mp3
AddHandler zippo .wav

Action zippo /users/zip.php3
---

I have tried modifying paths and it either throws up a Bad Request error or just remains Internal Server Error. When i remove the middle section;
AddHandler headered .htm
AddHandler headered .html
AddHandler headered .php
The script loads the user page, but without the header and footer fiels that should be there - also the error document found in a variable in one of the php3 files (also located in the /users/ directory) is not loaded.

I hope this is enough information to help me out - It would be much appreciated.

Thanks Again
James.

[edited by: jdMorgan at 4:04 pm (utc) on Mar. 13, 2008]
[edit reason] Removed specifics per Terms of Service. [/edit]

jdMorgan

4:15 pm on Mar 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The first place to look when you get a 500-Server Error is in the server's error log. If reviewing the error log does not answer your questions, it would be helpful if you could post the relevant contents (anonymized for your good and ours) here.

Also, be aware that several of the directives above can be combined on fewer lines for efficiency. for example, the first section can be written:


AddHandler headerd .gif .jpg .bmp .png .txt .css

The leading dots on the filetypes are optional. See Apache mod_mime docs for details.

You might also wish to change the two very-similar-appearing action names to something a little less visually-confusing, such as "header1" and "header2".

Jim