Using IIS Url Rewrite and ARR Reverse proxy to other domain with umbraco
Hey =)
So ive been trying to do some urlrewriting with a twist, I have to rewrite to another domain in this case. So ive setup a local test scenario.
http://main/ (the main site that should answer the requests)
http://old.main/ (the site that should handle the rewritten pages)
So the thing is this site is going live with only 2 languages and the last 10 langs are being rewritten to be on the old site(both new and old solution is running on the same server) until data is ready.
So ive setup my IIS with url rewrite 2.0 and ARR. ARR has enebled proxy so it should be able to handle requests to other domains.
Ive added your rule to my urlrewriting.net and restarted the solution, ive also removed my own rule from web.config. But still it just returns a 404 of the original site.
Same deal - client has 5 languages running on one domain now.
They want a completely new CMS (nearly built) but they only have time to get two of their languages setup before launch.
Two separate instances of Umbraco and the digital marketing company says that both the 2 new language sites and the 3 the remain on the old server must all be on the same domain - nightmare!
Lets say we have 5 language domains :
dk.mydomain.com (old)
se.mydomain.com (old)
ne.mydomain.com (old)
de.mydomain.com (new)
en.mydomain.com (new)
Cant you just setup 2 websites in the IIS, one for the new, one for the old. And just redirect the user between the 2 sites. You setup 5 A records for the 5 subdomains, but just split the host headers in the IIS.
The issue is here that the digital marketing need these two Umbraco sites to appear on one URL (as they do now). They say that if they are separated then there is risk and large costs involved.
Hence why I am thinking of Application Request Routing v3.
Using IIS Url Rewrite and ARR Reverse proxy to other domain with umbraco
Hey =)
So ive been trying to do some urlrewriting with a twist, I have to rewrite to another domain in this case. So ive setup a local test scenario.
http://main/ (the main site that should answer the requests)
http://old.main/ (the site that should handle the rewritten pages)
So the thing is this site is going live with only 2 languages and the last 10 langs are being rewritten to be on the old site(both new and old solution is running on the same server) until data is ready.
So ive setup my IIS with url rewrite 2.0 and ARR. ARR has enebled proxy so it should be able to handle requests to other domains.
My rewrite rule is like this :
So when i request http://main/en/about.aspx it should just return me http://old.main/en/about.aspx instead.
And everything seems awesome, ive installed the Adv. IIS logger so I can see the request going through.
The rewrite rule works but somehow umbraco catches the request and takes over.
here is an image from the log showing whats happening :
Anyone got an idea how to get around this ?
Is your rule in urlrewriting.config?
Hey Amir :)
Nope its in the web.config.
Ive tried throwing it inside urlrewriting.config but last time it gave the same result, though i havent check the log for that request.
Maybe try something along these lines?
Awesome amir ill try that out tomorrow !
Thx for your help so far !
Godmorning Amir :)
Ive added your rule to my urlrewriting.net and restarted the solution, ive also removed my own rule from web.config. But still it just returns a 404 of the original site.
My config file looks like this :
Hi Rasmus,
Did you ever get this working?
I have a client that is asking me to achieve pretty much the same thing and I want to know if it worked out for you.
Thanks, Splinx
Oh wow, no I dont think so actually, but its so old, its from 2013 this post.
what are you trying to do, maybe it can be achived in another way,.
Thanks Buddy,
Same deal - client has 5 languages running on one domain now.
They want a completely new CMS (nearly built) but they only have time to get two of their languages setup before launch.
Two separate instances of Umbraco and the digital marketing company says that both the 2 new language sites and the 3 the remain on the old server must all be on the same domain - nightmare!
The two Umbraco CMS systems are on the same server - so I was wondering if something like this was possible: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing
Cheers, Splinx.
Oh yack, another one of those hehe :)
Maybe we could simplify it.
Lets say we have 5 language domains : dk.mydomain.com (old) se.mydomain.com (old) ne.mydomain.com (old) de.mydomain.com (new) en.mydomain.com (new)
Cant you just setup 2 websites in the IIS, one for the new, one for the old. And just redirect the user between the 2 sites. You setup 5 A records for the 5 subdomains, but just split the host headers in the IIS.
Would be possible and I've done that before.
The issue is here that the digital marketing need these two Umbraco sites to appear on one URL (as they do now). They say that if they are separated then there is risk and large costs involved.
Hence why I am thinking of Application Request Routing v3.
Cheers, Splinx
Last time i tried it which is 4-5 years ago we came to the conclusion that it wasnt worth the effort. So we split to subdomains instead
hehehehe...
... I thought you might say that.
This is going to be dependant upon time/budget/risk/return I think.
Thank you ever so much for coming back to me.
If we do go ahead with ARR v3.0 or NGinx; I'll update this post.
Thanks again, Splinx
is working on a reply...