Edit Dreamhost .htaccess (to modify 404handler)

software development

#1

I’d like to edit my .htaccess file to have my 404handler go to:

missing.php

rather than the default:

missing.html

Can someone tell me how to do this or point me to an online tut that may help?

Thanks!

Don


#2

The .htaccess file is a plain text file you can modify with any text editor.

I believe the apache.org site has documentation on the syntax of that file.

– Dan


#3

I do not know what you are using, but here is how I set up my htaccess

Options -Indexes

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?tuckle.net/.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]

ErrorDocument 401 /failed_auth.php
ErrorDocument 403 /forbidden.php
ErrorDocument 404 /missing.php
ErrorDocument 500 /internal_error.php