Hi I am using .htaccess to create virtual subdomains. I added *.domainname.com in my hosting account. I am using following code. #RewriteCond %{HTTP_HOST} . #RewriteCond %{HTTP_HOST} !^www\. [NC] #RewriteCond %{HTTP_HOST}<>%domainname.com ^domainname.com/home.php?user=$1 [NC] #RewriteCond %1<>%3 !^(.*)<>\1$ [NC] #RewriteCond %{HTTP_HOST} ^(.+)$ #RewriteCond %{HTTP_HOST} ^domainname.com$ [NC] #RewriteRule ^(.*)$ http://domainname.com/$1 [R=301,L] Please guide thanks
Why do you want to create virtual subdomains? I'm pretty sure your hosting package comes with loads, if not unlimited subdomains .... From the look of your code above, are you trying to achieve: subdomain.domain.com redirect to domain.com/subdomain? All the best, Lynn.