500 Internal Server Error when trying to use ErrorDocument to handle request

Viewed 74846

I have this .htaccess file:

Options -Indexes
RewriteEngine on

ErrorDocument 404 /404.php

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^/]*)/?(.*)$ ./$1.php

RewriteCond %{THE_REQUEST} \.php
RewriteRule ^(.*)$ - [L,R=404]

However, when I go to localhost/example.php, it returns a 500 Internal Server Error.

Any help please? Thanks.

EDIT:

The full error message that comes up is:

Not Found

The requested URL /example.php was not found on this server.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
5 Answers

I have gotten this issue. But my error is disk of server is full 100%. You should check your server disk, as a consider solution.

Related