[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Re: Using username.domainname.com



> In httpd.conf:
> 
> <VirtualHost 208.147.154.56>
>   ServerName nobody.home.hiwaay.net
>   ServerAlias *.home.hiwaay.net
>   RewriteEngine on
>   RewriteCond %{HTTP:Host} nobody\.home\.hiwaay\.net
> [NC]
>   RewriteRule /*(.*) http://home.hiwaay.net/$1
> [R=301,L]
>   RewriteCond %{HTTP:Host} (..*)\.home\.hiwaay\.net
> [NC]
>   RewriteRule /*(.*) http://home.hiwaay.net/~%1/$1
> [R=301,L]
>   RewriteRule .* http://www.hiwaay.net/ [R=301,L]
> </VirtualHost>

Hi, Chris,
I made a little modification upon your code. Now it
works perfect. On browser address box it remains as
<anyuser>.mydomain.com instead of redirected to
www.mydomain.com/~<anyuser>

The code should follow that piece GUI created
Here is the code:

<VirtualHost xxx.xxx.xxx.xxx>
ServerName    nobody.mydomain.com
DocumentRoot  /home/sites/siteNN/users/nobody/web
ServerAlias   *.mydomain.com
RewriteEngine on
RewriteCond   %{HTTP_HOST}  ^[^.]+\.mydomain\.com$
RewriteRule   ^(.+)         %{HTTP_HOST}$1 [C]
RewriteRule   ^([^.]+)\.mydomain\.com(.*) 
/home/sites/siteNN/users/$1/web/$2
</VirtualHost>

Thanks a lot.
Stanley Zhang

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/