Added exceptions for localhost and 127.0.0.1 to option #2 rewrite rule.
This will prevent local running servers from redirecting something like
http://localhost/myapp to http://www.localhost/myapp.