RewriteEngine on
RewriteBase /
ReWriteRule \.htaccess [F]
RewriteRule ^([a-zA-Z0-9\/\-]+)$ index.php?url_path=$1
And I'd like to add a 301 redirect to move all access from http://example.com to http://www.example.com. How can I do it, keeping the current rewrite rule?

I have a problem with this. I have a website with several sub domains, and using this htaccess code it's impossible to enter subdomains.
Is there a workaround? Maybe defining several string (subdomains) to exclude?