Current location: Hot Scripts Forums » Other Discussions » Web Servers » help with subdomains


help with subdomains

Reply
  #1 (permalink)  
Old 07-15-07, 11:21 AM
klaniak klaniak is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Underground
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
help with subdomains

So I activated the wildcard for subdomains in the zone file
and I added the folowing in httpd.conf:
Code:
 <VirtualHost _ip_:80>
    ServerAdmin webmaster@a-zsearch.info
    DocumentRoot /home/a-zsearch/public_html
    ServerName www.a-zsearch.info
    ServerAlias *.a-zsearch.info
    ErrorLog logs/a-zsearch.info-error_log
    CustomLog logs/dummy-host.example.com-access_log common
  </VirtualHost>
now I am using this .htaccess for subdomains to work
Code:
rewriteEngine on 
rewriteCond %{HTTP_HOST} . 
rewriteCond %{HTTP_HOST}!^www\.a-zsearch\.info [NC] 
rewriteCond %{HTTP_HOST} ^([^.]+)\.a-zsearch\.info [NC] 
rewriteRule ^/(.*) /%1/$1 [L]
What I succeeded so far is that everything I type as a subdomain goes directly to the main domain.

If I have a sublfolder and I type subfolder.a-zsearch.info/subfolder it goes to the existing subfolder. Now I don't know what I did wrong, but if somebody knows some tips it would be great.

Last edited by Nico; 07-15-07 at 11:40 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there some way to make a script that automaticly create subdomains ?? klaniak PHP 0 06-14-05 01:17 PM
Mod_Rewrite and subdomains Infinite_Hackers The Lounge 0 01-22-05 10:40 AM
Automate Subdomains cebuy PHP 1 10-20-04 08:58 PM
Opinion seeking about domains vs subdomains in SE ranking greggy General Advertisements 0 10-15-04 06:32 PM
Creating subdomains Infinite_Hackers Script Requests 6 12-30-03 04:46 AM


All times are GMT -5. The time now is 12:49 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.