I am hosting multiple domains out of one installation and am having trouble with the 301 redirects. I tried using the Url Tracker package but it only would redirect to the top node on the content list. I know you can make redirect rules in the web.config, however this is also complicating because we have multiple domains and no way to differentiate which domain is running in the web.config. Is there a proper solution for this?
I literally was just about to post the same question. I have two domains:
www.abc.com and www.def.com for example. When I set the culture and host name for www.abc.com, the Link To Document is www.abc.com, but when I set the culture and hostname of www.def.com to www.def.com, the Link To Document stays at \.
I also installed the Url Tracker and I got it to work with www.abc.com\user which I want to redirect to www.abc.com\user\account, but when I set the same redirect up for www.def.com\user, it redirects to www.abc.com\user\account and not www.def.com\user\account.
I have a feeling this has to do with the hostname. The funny thing is when I changed the hostname to something other than www.def.com, the Link to Document had the hostname, so is something cached somewhere?
I also had to make sure I checked Force Redirect in Url Tracker in order to get anything to redirect because my user page is a page that exists
Maybe since you mentioned it, it is doing a redirect using the top domain only.
I am wondering if just writing two separate rewrite rules in urlrewriting.config is the way to go.
Well, I just deployed to my staging server, set up the redirect again and it worked, so not sure what to think. I am guess it caches this stuff somewhere?
301 Redirect with multiple domains
I am hosting multiple domains out of one installation and am having trouble with the 301 redirects. I tried using the Url Tracker package but it only would redirect to the top node on the content list. I know you can make redirect rules in the web.config, however this is also complicating because we have multiple domains and no way to differentiate which domain is running in the web.config. Is there a proper solution for this?
I literally was just about to post the same question. I have two domains:
www.abc.com
andwww.def.com
for example. When I set the culture and host name forwww.abc.com
, the Link To Document iswww.abc.com
, but when I set the culture and hostname ofwww.def.com
towww.def.com
, the Link To Document stays at\
.I also installed the Url Tracker and I got it to work with
www.abc.com\user
which I want to redirect towww.abc.com\user\account
, but when I set the same redirect up forwww.def.com\user
, it redirects towww.abc.com\user\account
and notwww.def.com\user\account
.I have a feeling this has to do with the hostname. The funny thing is when I changed the hostname to something other than
www.def.com
, the Link to Document had the hostname, so is something cached somewhere?I also had to make sure I checked Force Redirect in Url Tracker in order to get anything to redirect because my user page is a page that exists
Maybe since you mentioned it, it is doing a redirect using the top domain only.
I am wondering if just writing two separate rewrite rules in urlrewriting.config is the way to go.
I can't seem to get that to work either
I got mine working, but not sure if it is by luck. I did it this way:
Root Node = www.abc.com
Old URL: /user
Redirect URL: /user/account or Redirect Node: Account
Force Redirect is checked for me because the /user page does not throw a 404, but I still want to redirect.
I could have sworn I did this before, so I am a bit confused on why it works now. Are the entries cached?
UPDATE:
If I go to the websites within my company network, it redirects wrong, outside, it redirects fine.
Nevermind,
It stopped working. I am starting to think it is cached somewhere. It is really confusing.
Well, I just deployed to my staging server, set up the redirect again and it worked, so not sure what to think. I am guess it caches this stuff somewhere?
I was able to get this working by just setting up the redirects in the Web.config and having the different redirect rules for each different URL
Hi Carson,
Would you mind sharing what you did in web.config?
Mine acts weird...It works and then it doesn't.
Sorry for the late response. Web.config looks like this
And the rewritemaps.config looks like this
is working on a reply...