Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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
 
 
Register now for full access!
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.11392 seconds with 12 queries