Solved

atomatic subdomain access

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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
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 …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

860 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