RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/albums/([0-9]+)/([0-9]+)/?$ $server_info/album_file.php?user=$1&album_id=$2&media_id=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/albums/([0-9]+)/?$ $server_info/album.php?user=$1&album_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/albums/([0-9]+)/([^/]+)?$ $server_info/album.php?user=$1&album_id=$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/albums/?$ $server_info/albums.php?user=$1 [L]