I have a page like
index.php?username=thurein
i need to get with subdomain like
thurein.mydomain.com
how could i get it?
I have a page like
index.php?username=thurein
i need to get with subdomain like
thurein.mydomain.com
how could i get it?
you can redirect all subdomains to main domain for example on index.php, in the script you can parse the url and assign $_GET['username'] = $parsedSubDomain; and the script will do everything like index.php?username=thurein.
I hope it is clear.
P.S you can do the redirection using cPanel if your hosting supports it, or you need to change httpd config.
I have done like ..
RewriteEngine on
RewriteCond %{HTTP_HOST} !^mydomain.com [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([^.]+).mydomain.com [NC]
RewriteRule ^$ /index.php?username=%2 [QSA]
But I couldn't pass other variables. something like ...
thurein.mydomain.com/photos/1
what I want is that url re write to ..
index.php?username=thurein&page=photos&id=1
Thanks
If you can help me .. I do really appropriate for it.