Solved

atomatic subdomain access

Posted on 2006-11-26
4
169 Views
Last Modified: 2010-03-04
I have set up ftp support for student . Student can access it using this url : http://student.domain.com/username

how to make it's available to access student page using this url : http://username.domain.com for easy address.

thanks in advance
0
Comment
Question by:hendri2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:www-i-p-mu
ID: 18027510
Hi hendri2,

could you please explain your issue more in details.

Regards

www-i-p-mu
0
 

Author Comment

by:hendri2
ID: 18028146
thanks for respon,

I set virtual host for our student  :

<VirtualHost 192.168.1.2>
ServerAdmin webmaster@ourdomain.com
DocumentRoot /data3/student

<Directory  /data3/student>
        DirectoryIndex index.php index.html index.htm default.htm
        Options Indexes
    </Directory>

ServerName student.ourdomain.com

</VirtualHost>

Then add record in DNS to resolv 192.168.1.2 as student.ourdomain.com

each student can access their web using this address :

http://student.ourdomain.com/username

I want every student can access their address in this format :

http://username.student.ourdomain.com 

how to do that ?

0
 
LVL 33

Accepted Solution

by:
shalomc earned 500 total points
ID: 18069141
Try this

RewriteEngine on
RewriteCond   %{HTTP_HOST}                 ^[^.]+\.student\.ourdomain\.com$
RewriteRule   ^(.+)                        %{HTTP_HOST}$1          [C]
RewriteRule   ^students\.([^.]+)\.ourdomain\.com(.*)/$1$2



http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

0
 

Author Comment

by:hendri2
ID: 18081909
good solution, thx you very much
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question