简体   繁体   中英

Using IIS ARR to rewrite external URL

This might be a stupid question, however we have a website which we'll call http://example.com and we're using YuDu to publish some of our brochures online.

The URL's YuDu have given us are in the format http://content.yudu.com/htmlReader/SomeString/SomeName/SomeFile.html however we want to use our own URL's for these files:

ie http://example.com/ebrochure/SomeBrochure

I can setup URL rewriting for this, but it obviously redirects to the YuDu domain. Looking online it appears that I 'may' be able to use the IIS Application Request Routing module for this...but I'm at a loss as to how to do this. Everything I've found so far uses localhost and/or domains you already own for this.

So my question is:

  1. Is my request even possible?
  2. If so...could anyone point me in the right direction to do it?

Thanks in advance.

Matt

I don't think it's possible to do that. As far as the content must be served by yudu.com, you can only use redirections (with URL rewriting or by configuring a redirect in Application Request Routing). It will anyway end with a redirect. You could only manage this if yudu.com was one of your domains, which doesn't seem to be.

The only way I see if you really want to serve this content behind your example.com URL is using an iframe. But I don't know if Yudu will allow this.

Good luck !

It is definitely possible.

1) You need to install ARR module

2) In IIS manager you should enable reverse proxy

2.1) On server node click "Application Request Routing Cache"

2.2) Click "Server proxy settings" and click "Enable proxy", then "Apply"

3) In web.config add this rule:

<rule name="rewrite /ebrochure/SomeBrochure" stopProcessing="true">
    <match url="^ebrochure/SomeBrochure$" />
    <action type="Rewrite" url="http://content.yudu.com/htmlReader/SomeString/SomeName/SomeFile.html" />
</rule>

4) Open your url: http://example.com/ebrochure/SomeBrochure and you should see page from yudu

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM