PDA

View Full Version : .htaccess ErrorDocument Problem



usedearplugs
25 Oct 2012, 07:19 AM
I am using a public web host running Apache. I have multiple domains and subdomains. My web host DOES allow .htaccess and ErrorDocument control.

My webhost instructs to use the following in .htaccess for an Error Document...

ErrorDocument 404 /errorExample.html

I am using the following:

ErrorDocument 404 ./p/error/

/p/error/ is an url rewrite using .htaccess. It does work by itself, but as an ErrorDocument it brings up a white screen with the black test "./p/error/" at the top left. Using an html or php file name instead does the same thing.

If I get rid of the "." at the beginning, I get an Apache error screen (not my default 404) that says that while it couldn't find the page, it also couldn't find the 404 page. With this, I've also tried using index.php in case it's going to an unexpected directory, but it does the same thing.

The page I am doing this on is more of a test, so currently it is not a subdomain or a domain. It is just a folder within a domain. Is that the problem? If I make it a subdomain or a domain will it start working? If not, what am I doing wrong?

Thanks!