Home add www in URL if no subdomain but exception with some folders
 I want to add "www." to URLs if it doesn't contain "www." after "http://"; but it shouldn't get added if any file is requested from some specific folders. Here is what I have tried. RewriteEngine On RewriteCond %{PATH_INFO} ^/exception_dir(.)*$RewriteRule ^(.*)$ - [L] RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/\$1 [L,R=301]  With this code, presently, the "exception_dir" is NOT being exempted from redirection. What I am missing? And how to write RewriteCond and/or RewriteRule if there are multiple directories to be exempted? Do I need to write both RewriteCond and RewriteRule for each of the directories separately?