httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ya Netu <eco...@hotmail.com>
Subject [users@httpd] Virtual hosts or folders for easy accsesible user folders
Date Fri, 07 Aug 2009 23:49:24 GMT

hey all

I have a need to create easy accessible user profiles. basically here are my only 2 options:

 

username.mydomain.com

or

mydomain.com/username

 

for now we where using 2nd option but as result of plain folder creatin we eneded up with
roughly 5000 folders in the root directory an as result FTP became unaccessible as it only
supports 1000 folders, + if I want to find any system folder in tere (ex flash) it makes it
almost impossible to complete.

 

So I want to create either virtual or redirected folders. Something like if some one requests
either of above usrls and those urls (some how much user user folders) they get regirected
to for say: www.mydomain.com/users/username

 

Or even better (in ideal case cenario) maybe we can do custom module that would do following
loghic:

1. requested: www.mydomain.com/alex

2. logic: check is directory "alex" exist in root if so open it as reular page.

3. if dir does not exist open MySQL (ar any page that will resolve name to id)

4. if dir got resolved and we got id ex: id=123 redirect request to www.mydomain.com/users/userpage.php?id=123

 

If what i described is not possible I can go along with regualr user identification such as
username.mydomain.com.

I found following instructions on how to use module, but i ont know where to put them.

 

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.host\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.host\.com(.*) /AA/$1$2


 

I hope some one can help me out. And forgive me for my chaotic explanation of what I got.\

TNX a lot!



 

_________________________________________________________________
Get your vacation photos on your phone!
http://windowsliveformobile.com/en-us/photos/default.aspx?&OCID=0809TL-HM
Mime
View raw message