Hi can anyone help me?
How can i create subdomain with .htaccess using PHP
Actually i want the URLs like this.
Quote:
|
subdomain.mysitename.com -> mysitename.com/cat.php?sdomain=subdomain
|
and 2 level of subdomain
like,
Quote:
|
subdomain.domain.mysitename.com -> mysitename.com/cat.php?sdomain=subdomainname&domain=domain
|
Im very helpfull to yo for this.
One more thing i got one, but it work on only one level like, subdomain.domain.com
Quote:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.mysitename\.com
RewriteCond %{HTTP_HOST} ([^.]+).([^.]+)..com
RewriteCond %{REQUEST_URI} !^/category\.php$
RewriteCond %{QUERY_STRING} !^a=.&b=.
RewriteRule (.*) /category.php?a=%1&b=%2 [L]
|
with regards,
Inder
|