Hello,

I have had a good search through various other sites but have got some ideas on how I should approach this situation that I will be describing.

I have one web hosting account (shared) which has many domain names pointing to it.

I also have various sub-domains on each of the domains that are pointing to this server and its sub-directory's

A quick explanation for what would be the best approach to add my .htaccess file to so that I can map out my name-space would be much appreciated.

Before I go further I think I should give you some idea of how "Complex" my directory structures are and domain pointing/forwarding has turned out to be.

Part 1a)--------------

My First Group Of Domain Names

List of domain(s) I currently have pointing at my "\public_html\shop\" directory.

  • example-domain1.co.uk
  • example-domain1.com
  • example-domain1.net
  • example-domain1.mobi
  • example-domain1.org.uk
  • example-domain1.eu


1b) The following domain however points to the support section of the eShop, this itself resides in a seperate sub-directory on the *same server*. which is in "\public_html\support\index.php"

example-domain1.info

3c) The last of this set of domain names points to the trade directory which again is pointed to the eShop but One-layer deeper:

"\public_html\shop\traders\index.php"



*This domain redirects visitors with or without the 'www' prefix.

Part 2)--------------

Now for my Other Domain Name

My Second Domain name just points to my Blog which resides in [b]"\public_html\blog\"[b]

We will call this domain (http://www.blog-domain.me.uk):


Again both url's (with or without) the 'www' prefix refers to the "\public_html\blog\" directory.


Part 3)--------------

Now for my Last Domain Name

My Third and Last Domain name is forwarded to my Photo-Sharing sub-domain site which resides on the same server.

This location is: [b]"\public_html\picture_site\index.php"[b]



--- END OF DOMAIN PHYSICAL MAPPING---

Here is where the plot thickens and I do hope that you are with me thus far. Now come the .htaccess File(s) that directs and control the ErrorDocuments directives for each of the domain-Names and the sub-domain directory's.

This is what is messing me up

To explain my strategy so far is to have a limited amount of .htaccess files as possible thus, reducing the amount of times that Apache has to make http request calls and hopefully improve on response times and additional Bandwidth costs.

At the moment I have go all bits of .htaccess files, directives data scattered all throughout the different directory's and sub-directory's of my web hosts account.

I would like to bring All the .htaccess information and files into one manageable location * Preferably * a Big file so that Apache can have one place to look in and one place where all the rules are based

Preferable Locations
"\public_html\.htaccess"
Or
"\public_html\security\.htaccess"
Or
"\public_html\rules\.htaccess"

Is this achievable with this level of complexity regarding domain names and domain forwarding etc?

Any and all feedback would be much appreciated.