- sf Lindsay Hausner wrote:
-----Original Message-----From: Steve Finkelstein [mailto:sf@xxxxxxxxxxxxx] Sent: Thursday, June 28, 2007 11:06 PMTo: users@xxxxxxxxxxxxxxxx Subject: Application using Apache and URL schema inquiry Hi all, Hope this forum is appropriate for my dilemma. I'm currently looking for an elegant solution to the following problem. I have an application where each individual user logs into http://username.foo.com to access their vhost/own document root. Unfortunately, when you have a great deal of users, this adds quite the administrative overhead with maintaining each document root amongst a myriad of other issues. I'm looking for a more proper approach. If anyone can suggest how they solve this matter, I'd appreciate it. Here's my current thoughts: a) We ditch username.foo.com. EVERY user gets redirected to http://application.foo.com/appname or whatever URL we decide on. The backend database however, will be unique for each user. The variables for database connectivity will come from PHP's environment. The application will keep track of the username and dynamically connect to the appropriate backend database. b) Completely arbitrary URLs. Using mod_rewrite and mod_auth, the following is maybe possible? This seems the most elegant approach if it's possible. http://md5value.foo.com/application This way users can't just guess away at URLs. They'd almost be dynamic, if that makes sense. I don't want users being able to do http://username.foo.com/hack.php?foo=bar etc. Is there a way to use hashed directories and perhaps a mix of mod_rewrite to make something happen? Thank you kindly for your insight. - sf Why not use mod_userdir? lh.. ------------------------------------------------------------------------ !DSPAM:1020,46852aee650495369021049!
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx