I develop sites on a Windows machine running LAMP under WampServer. The final sites run on a Linux server. Obviously I want my development environment to match the live environment as closely as possible.
One of the problems I have is that I have been unable to use the same .htaccess file because of the following rule:
### re-direct non-www to www
RewriteCond %{http_host} !^www.mydomain.com$ [nc]
RewriteRule ^(.*)$ [
mydomain.com...] [r=301,nc,L]
####
Not being able to use the same .htaccess file is causing me severe problems because of other issues. Is there ANY way to make the above rule conditional on the server type?
The URL of the development site is of format [
localhost...] I basically don't want to run the above rewrite if the URL includes /localhost/ (or if the server type is Windows, I guess).
Any help would be much appreciated.