Solved

atomatic subdomain access

Posted on 2006-11-26
4
163 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now