Welcome to WebmasterWorld Guest from 54.145.209.34

Forum Moderators: phranque

.htaccess ErrorDocument for Multiple Domains on One Server

   
2:50 pm on Apr 21, 2011 (gmt 0)

10+ Year Member



I have one server that hosts many different websites. So, the path structure is like this:

Domain1
Domain1\Domain2
Domain1\Domain3
etc.

I am trying to set up a .htaccess file in the Domain 1 folder that will handle ErrorDocument redirecting for all the domains. This way if I add anything to my .htaccess file then I don't have to copy it to every domain. I currently have this line in my .htaccess file:

ErrorDocument 404 /error.htm

This works for Domain 1 which contains the error.htm file but not for the other domains. Is there a way to code this? I see you can put a url instead of a path to the error file but a number of online sites say that really isn't a good idea.
10:47 am on Apr 22, 2011 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



each domain will only be able to see the .htaccess file(s) in its root directory and subdirectories.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month