ghostsquad 0 Newbie Poster

I currently have some code in my .htaccess to redirect the user to the www version of the website.

IE if typed "mydomain.com" redirects to "www.mydomain.com"

But I also have apache installed on my development machine, setup with virtual hosts and my windows host file modified accordingly so I can go to mydomain.DEV and get to my local version

I want (without needing to modify the .htaccess file everytime I want to view my local version) to have that www rewrite apply for both the .dev and .com versions, anyone know how?

RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
RewriteRule ^/?$ http://www.mydomain.com [R=301]