I have transfered my DNS to Route 53 and currently use an alias record to point my www.domain.com and domain.com to my Elastic Load Balancer.
Both work great but my problem is when I try to use an htaccess file to redirect non-www to www. It just fails DNS lookup and errors out when I visit domain.com and get re-routed to www.domain.com, going straight to www.domain.com works still.
Before I did everything with the load balancer and when I was just testing the instance, I would go to the public DNS for my domain 'ec2-99-99-999-99.compute-1.amazonaws.com' for example and whenever I put the htaccess file in, it would jump to 'www.ec2-99-99-999-99.compute-1.amazonaws.com' and produce an error.
Any help would be much appreciated as I'm tearing my hair out over this.