I am fairly new to mod_rewrite, but what I'm trying to do is redirect HTTP requests from the format http://www.example.com/username to serve up content from a structured directory of users below my document root.
My document root is located at /var/www/html
To keep the usernames organized and secure, I have put them in /var/www/users/u/username where "/u" is the first alphanumeric character of "/username."
I cannot figure out the syntax of the rewrite rule. I think it should be something like this, but I know this isn't correct:
RewriteRule ^/(([a-z0-9])[a-z0-9]+)(.*) /var/www/users/$2/$1/$3
Can anybody help me figure out the correct syntax I'm looking for?