Hey,
thanks for your reply. But i still have a problem and i'm searching for the solution. well i'll try to describe it in more detailed way.
At first i did not know about user_dir so i created a vrtual host file for each user in /etc/apache2/sites-available and messed up my web server with such a lot of useless files.
My users are located at /home/username/public_html
for ex. /home/1st_user/public_html
/home/2nd_user/public_html
and etc.
So when i found out about user_dir mod i realised that i can have one single configuration to all my users.
here's my userdir conf:
- Code: Select all
<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride All
# FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
<Directory /home/*/public_html/cgi-bin/>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
AddHandler cgi-script .cgi .pl
</Directory>
</IfModule>
So i need understand where to put my mod rewrite rules and what are the ruls that i should put to.
And where actually put the code that u've shown to me.
in my opinion i just need to put a tricky rewrite rule code that server understand
www.username.example.com as
www.example.com/~username
May be you know a beter way to automate it or how to do in such kind a way?
by the way will mod_vhost_alias (that u showed to me) automate that as mod rewrite in one single configuration?
i know that creating a new virtual host file for each user by hand is not a solution
this problem i'm trying to solve for about a month and still not success.
waiting for the answers, thank u thank u...