0

DirectoryIndex index.php

Options All -Indexes

ErrorDocument 403 http://www.domain.com/forbidden

ErrorDocument 404 http://www.domain.com/error

<Files .htaccess>
Order Allow,Deny
Deny from all
</Files>

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]

This is my .htaccess document. I am having problem thats called HTTP Error 500 (Internal Server Error). When i am typing a page name which is not exist in my directory like http://www.domain.com/notexist . I wanted to show the custom error page (ErrorDocument 404 http://www.domain.com/error).

After removing the code below, it works fine, it shows the custom error page (ErrorDocument 404 http://www.domain.com/error).
But when i added this code again it shows the same HTTP Error 500 (Internal Server Error).

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]

Error document 403 (ErrorDocument 403 http://www.domain.com/forbidden) is working fine with above code.

Please suggest me...Please help me to get rid of it.

Edited by md.farhad: forget to point some issues

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.