Wanneer een webpagina onder http://sitenaam/ aangeroepen wordt, moet de standaard documentroot geset worden. Wanneer echter http://sitenaam/~user aangeroepen wordt, moet de documentroot gewijzigd worden naar een user-speciefieke directory.
http://www.webmasterworld.com/forum40/219.htm
Kort maar krachtig: in bovenstaande link wordt exact beschreven wat ik wil.
Ik heb al heel wat geprobeerd met Virtual Hosts, maar het wil niet. Ik krijg een beetje het gevoel dat Virtual Host niet de oplossing is. Maar hoe moet het wel?
bah, link werk niet op deze manier, hieronder de tekst uit de link:
http://www.webmasterworld.com/forum40/219.htm
Kort maar krachtig: in bovenstaande link wordt exact beschreven wat ik wil.
Ik heb al heel wat geprobeerd met Virtual Hosts, maar het wil niet. Ik krijg een beetje het gevoel dat Virtual Host niet de oplossing is. Maar hoe moet het wel?
bah, link werk niet op deze manier, hieronder de tekst uit de link:
edit:
Hey everybody,
I'm just setting up the Apache server on Mac OS X, and I'm having a problem...
I'm using the include() function in PHP, and in order to make my code portable, I'm including based on the Apache variable documentroot.
What I want to do is be able to set the documentroot variable differently for each user's directory, so that, for example:
localhost/~user1 - their documentroot is /home/usr/user1/html
and
localhost/~user2 - their documentroot is /home/usr/user2/html
Right now, documentroot is global for everything, and it's based on the file locations of localhost/, which isn't in a user's directory.
Any ideas??? Can I do it globally, or should I be doing this in a .htaccess file for each user, and in either case, how do I do it???
Thanks in advance...
Hey everybody,
I'm just setting up the Apache server on Mac OS X, and I'm having a problem...
I'm using the include() function in PHP, and in order to make my code portable, I'm including based on the Apache variable documentroot.
What I want to do is be able to set the documentroot variable differently for each user's directory, so that, for example:
localhost/~user1 - their documentroot is /home/usr/user1/html
and
localhost/~user2 - their documentroot is /home/usr/user2/html
Right now, documentroot is global for everything, and it's based on the file locations of localhost/, which isn't in a user's directory.
Any ideas??? Can I do it globally, or should I be doing this in a .htaccess file for each user, and in either case, how do I do it???
Thanks in advance...
[ Voor 55% gewijzigd door Abidan op 01-01-2004 23:29 ]