Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is my .htaccess:

DirectoryIndex index.php
DefaultType application/x-httpd-php
AddDefaultCharset utf-8
Header set X-Frame-Options DENY

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

<Files ~ '\.inc.php$'>
Order deny,allow
Deny from all

ErrorDocument 404 /inc/404.html

Is there anything I'm doing wrong? I really have no idea where to start. Any answer would be greately appreciated.

share|improve this question
You should start at showing the log file! – mailq Dec 5 '11 at 22:58
PHP can be the cause of 500 errors as well as Apache. More information will usually show up in the Apache error log or the php error log or directly on the page itself (depending on what you have configured.) – Ladadadada Dec 5 '11 at 23:16
I didn't know PHP could cause a 500 error! When I hosted it on my on computer (with XAMPP) it never happened. And yeah, I saw the log and the error was there, thanks a lot to both – federicot Dec 6 '11 at 0:43

Try increasing the LogLevel in your Apache configuration. Force the 500 error to appear again. Copy & paste the excerpt of the logfile where the 500 error occurs, so we might help you finding the reason. In case you need further assistance on how to access logfiles etc. just drop a line.

share|improve this answer
I already solved the problem, it was a typo in the PHP code. Thanks anyways! – federicot Dec 6 '11 at 8:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.