I have a website that opens when the user enters either http://example.com or http://www.example.com.
I need to configure the server or the app to redirect with a permanent redirect to http://www.example.com when example.com is accessed.
What is very important is that the path is preserved, so if example.com/path/page.aspx?p=1, the redirect should be done to http://www.example.com/path/page.aspx?p=1.
thanks!
Using the URL Rewrite you can do this by adding a configuration in you web.config. You need to install this module in your IIS as well. Here is an example, not fully tested: