If you (or your hosting) are using Windows Server IIS to host your site, you will need to change your domain root folder to public sub-folder. This folder already includes web.config file with rules for windows server so you should not need to do anything else.