Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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 :
<rule name="demo"> <match url="^(fi|en|de|fr|it|nl|no|es|se|ch)/(.*)" /> <action type="Rewrite" url="http://old.main/en/about.aspx" /> </rule>
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?
<add name="domainRewrite" virtualUrl="^(fi|en|de|fr|it|nl|no|es|se|ch)/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="http://http://old.main/$1" redirect="Domain" redirectMode="Permanent" ignoreCase="true" />
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 :
<urlrewritingnet> <rewrites> <add name="domainRewrite" virtualUrl="^/(fi|en|de|fr|it|nl|no|es|se|ch)/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="http://http://old.main/$1" redirect="Domain" redirectMode="Permanent" ignoreCase="true" /> </rewrites></urlrewritingnet>
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.
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,.
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:
Oh yack, another one of those hehe :)
Maybe we could simplify it.
Lets say we have 5 language domains :
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.
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
... 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.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted