Hello,
I have an old domain name (domain1.com) that I want to redirect (301) automaticaly to a new domain name (domain2.com).
I tried to use IIS redirection. I have a web site that answers to every requests on a particular IP. I wrote this as the redirection URL (with exact URL and permanent redirection options checked):
http://www.domain2.com$V
This is working fine. However, users can access domain1.com by using many different hosts (host1.domain1.com, host2.domain1.com) and no host at all (http://domain2.com) on either http or https protocol (so I don't want to hardcode http://www).
I then look at wildcard redirection. I tried this:
*; *.domain1.com; $0.domain2.com$V
It however doesn't work, I receive the "page not found" error. I thought that should work. Am I doing something wrong?
I also tried two "URL Rewriters" (3rd Party - IIRF, ISAPI_REWRITE), but they seem to conflict with another ISAPI filter that I can't remove. This is why I'm trying to make IIS built-in redirection works.
Can someone help?
Thanks!