I have been following all of your lessons and ideas in relation to htaccess and mod-rewrite but I am confronted with one other issue.

I've this:

RewriteCond %{ENV:REDIRECT_SUBDOMAIN} ="" 
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9][-a-z0-9]+)\.fourthdraft\.com\.?(:80)?$ [NC] 
RewriteCond %{DOCUMENT_ROOT}/userdata/%2 -d 
RewriteRule ^(.*) index.php/frontend/index/%2/$1 [E=SUBDOMAIN:%2,L] 
RewriteRule ^ - [E=SUBDOMAIN:%{ENV:REDIRECT_SUBDOMAIN},L] 

It redirects user.mywebsite.com to mywebsite.com/user. this works perfectly however it fails after i attempt to do another redirect.

now I am attempting to add another feature. If a person types in user.fourthdraft.com/blog, i'd would like it to redirect to a different file. using what we've at this time just redirects everything i type with user.fourthdraft.com to fourthdraft.com/user. I have added another rewriterule block to produce the main difference:

RewriteCond %{ENV:REDIRECT_SUBDOMAIN} ="" 
RewriteCond %{REQUEST_URI} ^blog$ [NC]  
RewriteRule ^(.*) index.php/frontend%3/%2/$1 [E=SUBDOMAIN:%2,L] 
RewriteRule ^ - [E=SUBDOMAIN:%{ENV:REDIRECT_SUBDOMAIN},L]  

RewriteCond %{ENV:REDIRECT_SUBDOMAIN} ="" 
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9][-a-z0-9]+)\.fourthdraft\.com\.?(:80)?$ [NC] 
RewriteCond %{DOCUMENT_ROOT}/userdata/%2 -d 
RewriteRule ^(.*) index.php/frontend/index/%2/$1 [E=SUBDOMAIN:%2,L] 
RewriteRule ^ - [E=SUBDOMAIN:%{ENV:REDIRECT_SUBDOMAIN},L] 

what this may is, it partly does the task however it only redirects as much as frontend/blog. %2 backreferencing reduces it does not show. The initial redirect also begins to fail too.

I have attempted re-ordering the blocks, altering the REQUEST_URI to HTTP_HOST then regex to: ^(www.)?([a-z0-9][-a-z0-9]+).fourthdraft.com/blog.?(:80)?$ however it leads to exactly the same effect.

I apologize i am a new comer to htaccess and that i might be doing things wrong. please show me the sunshine

**to include, it really works sometimes but when i key in user.fourthdraft.com/blog, it searches for a real folder named 'blog' underneath the root folder. ( i suppose redirection did not happen)