0

i m developing a website and hosted on server. i just want if some one write in browser URL name [dot]com it will redirect to WWW[dot]URL name [dot]com is it possible to some
I I S setting or some other way . i goggled a lot but can't find any way to do that.if any one have any idea so please let me know

thanks..

hungry
  • 37
  • 1
  • 13

1 Answers1

1

Try Url Rewriting for this.If your IIS wasn't installed with Rewrite module, go to this page to download it.

See this StackOverFlow Question for more details.

 <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="Add www" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="*" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="www.YourDomain.com" negate="true" />
                        </conditions>
                        <action type="Redirect" url="http://www.YourDomain.com/{R:1}" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
Community
  • 1
  • 1
Subin Jacob
  • 4,692
  • 10
  • 37
  • 69