Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 21, 2013 @ 16:03
    Rasmus Fjord
    0

    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 : 

     <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 ?

  • Amir Khan 1287 posts 2744 karma points
    Mar 21, 2013 @ 16:23
    Amir Khan
    0

    Is your rule in urlrewriting.config?

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 21, 2013 @ 16:54
    Rasmus Fjord
    0

    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.

  • Amir Khan 1287 posts 2744 karma points
    Mar 21, 2013 @ 17:35
    Amir Khan
    0

    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" />

     

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 21, 2013 @ 17:41
    Rasmus Fjord
    0

    Awesome amir ill try that out tomorrow !

    Thx for your help so far ! 

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 22, 2013 @ 09:15
    Rasmus Fjord
    0

    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>

     

  • Splinx 50 posts 186 karma points
    Jul 19, 2018 @ 11:33
    Splinx
    0

    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

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jul 19, 2018 @ 11:38
    Rasmus Fjord
    0

    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,.

  • Splinx 50 posts 186 karma points
    Jul 19, 2018 @ 11:41
    Splinx
    0

    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.

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jul 19, 2018 @ 11:45
    Rasmus Fjord
    0

    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.

  • Splinx 50 posts 186 karma points
    Jul 19, 2018 @ 13:50
    Splinx
    0

    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

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jul 19, 2018 @ 14:07
    Rasmus Fjord
    0

    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

  • Splinx 50 posts 186 karma points
    Jul 19, 2018 @ 14:09
    Splinx
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft