Reply
How can i create subdomain with .htaccess using PHP
Old 08-27-2009, 04:13 AM How can i create subdomain with .htaccess using PHP
Junior Talker

Posts: 1
Name: Inder
Trades: 0
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
inder96 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Reply     « Reply to How can i create subdomain with .htaccess using PHP
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10696 seconds with 13 queries