NameVirtualHost MYIP:80 ServerName www.MYDOMAIN ServerAlias MYDOMAIN DocumentRoot /pathto/homedir/ Options -Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all IndexOptions DirectoryIndex index.php index.htm index.html index.shtml index.php3 RewriteEngine On RewriteCond %{HTTP_HOST} ^www.MYDOMAIN$ [NC] RewriteRule ^(.*) http://MYDOMAIN/$1 [L,R=301] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d RewriteRule . - [L] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f RewriteRule . - [L] RewriteCond %{DOCUMENT_ROOT}/users/%{REQUEST_URI} -d RewriteRule ^(.+)$ /users/$1/ [L] RewriteCond %{DOCUMENT_ROOT}/users/%{REQUEST_URI} -f RewriteRule ^(.+)$ /users/$1 [L] -----this is in another file which becomes included: ServerName www.USERNAME.MYDOMAIN ServerAlias USERNAME.MYDOMAIN www.USERNAME.MYDOMAIN DocumentRoot /pathto/homedir/users/USERNAME DirectoryIndex index.php index.php3 index.php4 index.html index.htm RewriteEngine On php_admin_value upload_tmp_dir /tmp php_admin_value open_basedir /tmp:/pathto/homedir/users/USERNAME Allow from all