Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
</Files>

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
1  
You should start at showing the log file! –  mailq Dec 5 '11 at 22:58
1  
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 –  fedeetz Dec 6 '11 at 0:43

1 Answer 1

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! –  fedeetz Dec 6 '11 at 8:10

Your Answer

 
discard

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.