Page 1 of 1

how to map a querystring to subdomain using mod_rewrite

Posted: Wed May 12, 2010 8:06 am
by swetamakode
Hello,

In my website I used the url like www.domainname/user/page.php which i had done using mod_rewrite in .htaccess file,originally the url is like
www.domainname?uid =user&pid=page.php,but now the client had asked me for the url like

www.user.domainname.com.page.php is it possible to get it by URL mapping and using the concept of virtual subdomain or I have to introduce the concept of subdomains creation in my website to get it done.

Please reply asap.

Thankyou.

Re: how to map a querystring to subdomain using mod_rewrite

Posted: Wed May 12, 2010 10:13 am
by AbraCadaver
You can't do that. The browsing machine will never be able to resolve that as it is not a valid domain name.