Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Using custom error page with .htaccess

user966582:

I want to remove .php file extentions and add custom error page through .htaccess file.

Following is the complete code of my .htaccess file:


RewriteEngine On
#Remove .php file extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*[^/])/?$ $1.php [L]

#Use error500.php file located in the root dir
ErrorDocument 500 /error500

The first part to remove extension works but second part does not work. It does not use the error500.php file. I have tried adding both with and without .php extention.

Here's the error that I get in the apache error.log

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

What I'm doing wrong?



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Using custom error page with .htaccess

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×