DeveloperSide.NET Forums

DeveloperSide.NET => Anything else goes here => Topic started by: majika on February 05, 2008, 06:54:39 PM



Title: Complex Domain Names and Sub-domains mapping via htaccess Help required
Post by: majika on February 05, 2008, 06:54:39 PM
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) with no direct access to Apache httpd.config and siteadmin is a grumpy $%^&*r 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[/b]

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"

  • www.example-domain1.biz
  • example-domain1.biz

*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 "\public_html\blog\"

We will call this domain (http://www.blog-domain.me.uk):
  • www.blog-domain.me.uk
  • 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: "\public_html\picture_site\index.php"

  • www.picture-domain.co.uk
  • picture-domain.co.uk

--- 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 direrect 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 buts of htaccess files, directives data scattered all throughout the different directory's and sub-directory's of my web hosts server.

I would like to bring all the htaccess info into one manageable location * Preferably *

"\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.