Forum Moderators: phranque

Message Too Old, No Replies

.htaccess ErrorDocument for Multiple Domains on One Server

         

webstuck

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.

phranque

10:47 am on Apr 22, 2011 (gmt 0)

WebmasterWorld Administrator 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.