I'd like to redirect a subdomain to a user directory.
So I've tried this config, but it seems redirect to the root folder.
<VirtualHost *:80>
ServerName epnet.fr
ServerAlias *.epnet.fr
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([a-z0-9-]+)\.epnet\.fr
RewriteCond /home/%1/apps/ -d
RewriteRule ^(.*) /%1/$1 [L]
<Directory /home>
Options Includes FollowSymlinks
AllowOverride All
Order allow,deny
Allow from All
</Directory>
</VirtualHost>
For example, I've a user 'tiste', I'd like to redirect tiste.epnet.fr to /home/tiste/apps/ and then, any pages of the website which are on apps/ will be accessible tiste.epnet.fr/index.php
Thanks !