sub.domain.com => /www/sub/domain.com/html

Using a single web hosting account to host multiple sites

sub.domain.com => /www/sub/domain.com/html

Postby winmutt » Mon Jan 31, 2005 5:38 pm

I want the follwoing to occur :

domain.com and sub.domain.com are both dynamic. I am using this for akllowing my developers to work on their own copy before publishing to beta.domain.com and then www.domain.com

sub.domain.com => /www/sub/domain.com/html
domain.com => /www/www/domain.com/html

Currently I have :

Code: Select all
RewriteEngine on
RewriteCond   %{HTTP_HOST}                 [^.]+\.[^.]+$
RewriteRule   ^(.+)                        %{HTTP_HOST}$1          [C]
RewriteRule   ([^.]+)\.(.+) /www/$1/$2


But this does not account for no subdomain and does not send the user to the html folder.
Also how would I go about creating logs? Any suggestions would be appreciated.
winmutt
 
Posts: 3
Joined: Mon Jan 31, 2005 5:31 pm

Postby winmutt » Mon Jan 31, 2005 6:09 pm

Also if anyone has any suggestions on how to possibly link the target directory name to a record from a postgres db.
winmutt
 
Posts: 3
Joined: Mon Jan 31, 2005 5:31 pm

Postby Caterham » Tue Feb 01, 2005 4:49 am

is /www an alias = visible in the URL?? Otherwise you cannot use mod_rewrite here, if the path is not accesseble by the webserver.

Also how would I go about creating logs? Any suggestions would be appreciated.
You've to create a virtual host if you cannot filter the log by an external programm e.g. for accessed IP address
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm

Postby winmutt » Tue Feb 01, 2005 10:03 am

Caterham wrote:is /www an alias = visible in the URL?? Otherwise you cannot use mod_rewrite here, if the path is not accesseble by the webserver.


/www is a directory off the root. Under that I have subdomains and then under that domains. This is done so that individuals can work on developing a product internally before publishing to beta.domain.com and www.domain.com

You've to create a virtual host if you cannot filter the log by an external programm e.g. for accessed IP address


ok
winmutt
 
Posts: 3
Joined: Mon Jan 31, 2005 5:31 pm

Postby Caterham » Wed Feb 02, 2005 1:47 am

off the root
mod_rewrite cannot map folders outside the htdocs. You have to use an Alias to map other folders
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 119 guests

cron