I recently converted all my website's files to .php, including my index.html and 404 page. Everything worked fine until I clicked a dead link, and no 404 page came up. Naturally, I figured I forgot to update the .htaccess file. After doing so and re-uploading it, every page on my site is a 500 error. And not a custom 500 page, which I had previously designed, but a generic, browser-generated thing, even though my 500 page is on the server. Here's the code for my .htaccess file:

AuthType Basic
AuthName ""
Order deny,allow
Require user 
Require group 
Allow from 
Deny from 
RewriteEngine  on
RewriteRule ^$  [L]

RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[345].*Gecko*
RewriteRule ^$  [L]

RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[345].*MSIE*
RewriteRule ^$  [L]

RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[12].* [OR]
RewriteCond %{HTTP_USER_AGENT}  ^Lynx/*
RewriteRule ^$  [L]

RewriteRule ^$  [L]

RewriteRule (.*) /$1 [PT]
ErrorDocument 400 
ErrorDocument 401 
ErrorDocument 403 
ErrorDocument 404 error404.html
ErrorDocument 500 

Can anyone give me some advice on remedying this issue?

Recommended Answers

All 2 Replies

On a side note, I've deleted the offending .htaccess file now to prevent downtime. The site is in working order, except for the custom error pages and redirects.

Not sure tbh.

I would recommend recreating the .htaccess file one line at a time, and testing to see that each line works. At least this should allow you to isolate the specific statement that is causing a problem, and hopefully narrow down why it is a problem in the process.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.