Page is a not externally linkable
jdMorgan - 1:58 pm on Jul 12, 2011 (gmt 0)
The RewriteRule [L] flag means, "stop processing right here for this pass through the mod_rewrite code if this rule matches. However, in a per-directory .htaccess context, mod_rewrite processing is always restarted after any rule matches, another pass will be performed, and this will continue until no more rules match. Only then will mod_rewrite truly "exit."
Therefore, as lucy24 points out, it is necessary to add a RewriteCond to your rule that stops the redirect if the requested hostname is already "mobi.mysite.com"
RewriteCond %{HTTP_HOST} !^mobi\.mysite\.com
For the sake of efficiency, I'd make that the first RewriteCond for your rule. Note that "!" means "NOT".
"Copying and pasting" is not recommended. Mod_rewrite is a powerful and therefore a potentially very-dangerous tool. Do not use mod_rewrite if you do not fully understand how it works and what the effects of each rule will be to both the server itself and to "users" such as people and search engine robots. One tiny little typo or oversight in your code can ruin your search engine rankings and/or drive off customers who experience problems.
I recommend that you study the mod_rewrite documentation and references cited in our Apache Forum Charter -- spending 3 days or a week with that documentation may save you years of frustration and serious technical problems with your site -- and it may save you from putting yourself out of business. We have, unfortunately, seen that happen here...
Jim