Subdomains & VirtualDocumentRoot

Using a single web hosting account to host multiple sites

Subdomains & VirtualDocumentRoot

Postby ffgghh » Thu Dec 22, 2005 1:17 am

HI everybody,

I have dns configured - and all dns and sub-dns requests point to the same IP;
Im using Apache 2 with
/* */ VirtualDocumentRoot /http/%-2.0.%-1.0/%-3+

This allows me to generate domains like this:
/**/
http://mydnsname.lv ==> /http/mydnsname.lv/_
http://www.mydnsname.lv ==> /http/mydnsname.lv/www
http://other.mydnsname.lv ==> /http/mydnsname.lv/other
/**/
in every /http/mydnsname.lv (dns) folder I have htaccess file whitch redirects not existing sub-dns requests to specific dns:
/**/
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://mydnsname.lv [QSA,L]
/**/
BUT:

Could anyone help me to create solution like this:

exists http://mydnsname.lv ==> /http/mydnsname.lv/_

(with modrewrite - or any other solution)
any request to non existing directory
go to /http/mydnsname.lv/_/index.php?req=$1
but address in clients browser do not change

I mean

user requests testdns.mydnsname.lv
but sees page from http://mydnsname.lv
(/http/mydnsname.lv/_/index.php?req=$1)

Please help ?

all sub-dns
not douindo not
ffgghh
 
Posts: 1
Joined: Thu Dec 22, 2005 1:06 am

Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 24 guests

cron