rendered paste bodyNameVirtualHost MYIP:80
<VirtualHost MYIP:80>
ServerName www.MYDOMAIN
ServerAlias MYDOMAIN
DocumentRoot /pathto/homedir/
<Directory /pathto/homedir>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
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]
</VirtualHost>