I have a .net and a .com for the same domain. I want anyone clicking a link or that enters the domain.com (and any page) to be redirected to the domain.net. How can I do this? Thank you,
Ray, I have a domain pointer on my site that points to the .com (we use it for email), but if I enter the .com address into the browser it does not redirect me to the .net domain. Do I need to set it up a special way? Thank you,
Ray, Sorry about previous post, it is likely that the .com is redirecting, but I need it to actually show the .net domain in the browser so that I'm not required to buy another SSL Cert. for the .com, we have one for the ,net with DiscountASP. So if someone was to type https://domain.com they are redirected to https://domain.net
I knew there was a web page article out there that will resolve your issue using IIS URL Rewrite but I couldn't find it until now. http://weblogs.asp.net/owscott/iis-url-rewrite-redirect-multiple-domain-names-to-one If you want to connect to your site via IIS Manager please read our knowledge base article on how to do it here: https://support.discountasp.net/kb/a400/how-to-connect-to-windows-2008iis-7-using-microsoft.aspx
martino, I tried this suggestion in my web.config but no go. the <rewrite> tag has a warning that rewrite is not a child of system.webserver. So when I type in our domain.com in the browser it does not show domain.net. Here is what I added (with our domain of course): <rewrite> <globalRules> <rule name="Redirects to www.OurDomainHere.net" patternSyntax="ECMAScript" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAny"> <add input="{HTTP_HOST}" pattern="^OurDomainHere.*(net|com)$" /> <add input="{HTTP_HOST}" pattern="^(www.)?OurDomainHere.(net|com)$" /> <add input="{HTTP_HOST}" pattern="^www.OurDomainHere.com$" /> </conditions> <action type="Redirect" url="https://www.OurDomainHere.net/{R:0}" /> </rule> </globalRules> </rewrite> I do have a domain pointer on the domain that we need and use for email. Any ideas? Thank you,
Where did you put this rule? It needs to go into the root directory's web.config file. By default domain pointers will always point to the root directory of your site account. Unless you have code or URL Rewrite rules to redirect/rewrite to somewhere else.
Martino, I put the following in my root web.config inside the System.webServer section: <rewrite> <globalRules> <rule name="Redirects to www.mydomainhere.net" patternSyntax="ECMAScript" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAny"> <add input="{HTTP_HOST}" pattern="^mydomainhere.*(net|com)$" /> <add input="{HTTP_HOST}" pattern="^(www.)?mydomainhere.(net|com)$" /> <add input="{HTTP_HOST}" pattern="^www.mydomainhere.com$" /> </conditions> <action type="Redirect" url="https://www.mydomainhere.net/{R:0}" /> </rule> </globalRules> </rewrite>
Did you set up the domain pointer to have the domain.com to point to the domain.net account? Did you also change your name servers for domain.com to point to our name servers below: NS1.DISCOUNTASP.NET NS2.DISCOUNTASP.NET NS3.DISCOUNTASP.NET What exactly happens when you go to: Domain.com in the web browser? Does it go to the site account on our web server or does it go to a different site not hosted by us?
Martino, The DNS is pointing to DiscountASP, the web browser shows the .com URL (I want it to redirect/show the .net even if someone enters the .com), and it does open the website hosted on DiscountASP (the only one it can open).
That web page article shows you exactly how to do it here: http://weblogs.asp.net/owscott/iis-url-rewrite-redirect-multiple-domain-names-to-one Try using IIS Manager this time to create the rules listed in the blog post article. What happens when you go to the .net domain? Does it go to the site on DASP that you have hosted?