mod_rewite or mod_proxy help making subdomain

hi
every one . hope you all are fine.
i am stuck with a problem .

What i want to do .

http://www.example.com/test

where ‘test’ is profile variable.

http://test.example.com/

i used

RewriteCond %{HTTP_HOST} ^(www\.)?myzenvei.com$ [NC]

RewriteRule (.*) http://$1.myzenvei.com/$1 [R=301,L]

but didnt worked correctly

any help

regards
khan

khan,

Does the subdomain test exist? A subdomain is treated EXACTLY like a full fledged domain so it must be “registered” with the DNS and Apache for it to work. Otherwise, it looks okay.

Regards,

DK

hi
thanks for reply . i want to create subdomain virtually.

ok is there any method i open url and it looks in bar like this

http://khan.myzenvei.com/

but actually data coming from this

http://www.myzenvei.com/khan

where ‘khan’ is profile id of memeber

thanks

can we chat on skype or yahoo
skype: fahdjalalion

regards
khan

khan,

Nope! You MUST declare the subdomain for it to find your Apache and have it serve files. Do you have cPanel? Setup the subdomain there. If this is for your own test server, add test.localhost as a VirtualHost and add it to the hosts file.

Regards,

DK