View Single Post
  #2 (permalink)  
Old 12-05-2006, 01:55 PM
jitender's Avatar
jitender jitender is offline
Site Admin
 
Join Date: Jun 2004
Posts: 1,200
jitender has a spectacular aura aboutjitender has a spectacular aura aboutjitender has a spectacular aura about
iTrader: (0)
Default

Hi there

You can try the below code

Code:
#Grab the subdomain from the domain RewriteCond %{HTTP_HOST} ^([^.]+).DOMAIN.COM$ #Make sure the subdomain is not www or example RewriteCond %{1} !^(www|example)$ #Check if the directory actually exists before we go there RewriteCond /home/USER/public_html/%1 -d #This stops it from looping RewriteCond %{REQUEST_FILENAME} !^/home/USER/public_html/ #Finally, this is the actual rewrite RewriteRule (.*) /home/USER/public_html/%1/$1 [Last]

Change the DOMAIN.COM WITH YOUR OWN DOMAIN AND USER WITH YOUR USER NAME

and try

Regards
Jitender
__________________
Free Webmaster Tools - Free SEO Tools
phpLDHacks - Add your template or Hack and earn money
Text Link Ads - Buy & Sell text link ads
Reply With Quote