redirect domain.com to www.domain.com with dns and iis , ERROR = "The page isn't redirecting properly"

I have a web site with the name of soscharge.com for redirecting soscharge.com to www.soscharge.com i followed the below link :

asp.net web site -> how redirect domain.com to www.domain.com with dns and iis? (prevent duplicate for seo)

i really confused for checking http redirect check box in iis 7.0(windows server 2008)?

i configured my iis as that link said... mean made two web sites in iis (with and without www)... and installed HTTP Redirection...

but when i want to check redirect check box on domain.com the other web site (www.domain.com) redirect check box is checked! why?

and when i open domain.com or www.domain.com in browser (firefox) i get the below error :

**The page isn't redirecting properly**

Firefox has detected that the server is redirecting the request

for this address in a way that will never complete.

*This problem can sometimes be caused by disabling or refusing to

accept cookies.

how can i prevent double checking of redirect checkboxes? is this normal? and how can i fix that error?(my cookies are enable in FireFox)?

thanks in advance

Answers


In IIS 7, if you set the site directory the same in the www and non-www versions you'll run into an infinite redirect situation as IIS actually makes an entry in the web.config file, and since both sites are pointing to the same place they share the same config. I leared this the hard way as well!

Now, I point the redirect site to an empty directory so it can have its own web.config.

If you don't like having a bunch of sites set up just for redirecting, another solution is to use the url rewrite module and make a redirect rule. Here is a blog posting about that: http://blogs.iis.net/carlosag/archive/2010/03/31/seo-made-easy-with-iis-url-rewrite-2-0-seo-templates.aspx


Need Your Help

Getting gui dialog pop-ups (from bash) to stay on top of other windows

bash kubuntu scripting kde user-interface

I posted this on the yad list, apparently with invisibility enabled (nobody's even viewed it! - usually, the list is very responsive.), so I thought I'd see if any of you have some ideas. It probably

Is storing HTML as blob information in SQL Server a good idea?

sql-server sql-server-2012

Is is a good idea to store an HTML string as blob data in SQL server or should we keep it as a string? Currently, we do not have a need to search the data in the HTML. Also, for security reasons we...