Forum Moderators: phranque
I have two sites pointing to the server. If I use the urls without www. in front of it, apache directs the request to the right subfolder, if I use www.sitename.com then it drops it to the root folder (The first folder it comes across in the conf file)
How do you write the VirServer confirguration so it directs to the appropriate folder whether the URL has WWW or not?
This is what I have in my conf file.
<VirtualHost 192.168.1.12>
ServerName mysitename.com
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mysitename"
</VirtualHost>
When I use www.mysitename.com in the URL, it directs to the root folder htdocs, if I remove the www. it goes to the mysitename folder like it should.
Can anyone offer advice on correcting this?
Thanks
David