Posted by Alvaro G. Vicario on 08/18/06 18:50
*** Tarscher escribió/wrote (18 Aug 2006 00:36:05 -0700):
> I 'm building a website that provide services for soccer teams. When a
> user (team) signs up I want to give him some personal space like
> http://www.soccerteamonline.com/teamname where www.soccerteamonline.com
> is my registered domain and teamname is the name chosen by the user. I
> want to have one singel code base meaning that I don't want to copy my
> code to every new account. Can someone please give me some advice on
> how to achieve this since I really don't have an idea on how to do
> this.
Such things are usually accomplished using Apache's mod_rewrite (if your
web server _is_ Apache, of course). It works like this:
User asks for /teamname/ -> Server calls /foo.php?team=teamname
User asks for /teamname/bar -> Server calls /bar.php?team=teamname
Google for "mod_rewrite cheat sheet", it *is* confusing if you're new to
it.
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Navigation:
[Reply to this message]
|