question

GreggDow-9230 avatar image
0 Votes"
GreggDow-9230 asked BruceZhang-MSFT commented

IIS10 - Can a "rewrite" work with embedded links in PDFs or Documents?

We have migrated our Enterprise platform from Win2k8R2 to Win2k16. We have only one webserver, with MANY links and embedded links directly pointing back to the old IIS7.5 server (don't ask, long story). The links are merely UNC paths and do not include the FQDN. We are quickly approaching the point where the old server needs to be shut down. We cannot just rename the new server to the old, as there is a Enterprise naming convention that must be adhered to.

I'm just wondering if "Re-Write" should work in this scenario. My co-worker has tried on their home set-up, (another story) with no luck.
I would like to test it on the production setup, as everyone knows the situation and would be warned when the old server is off for a short period of testing.

We have already asked our Enterprise DNS staff to look into it with a DNS Alias or Cname, etc , but they indicated that wouldn't work.

Does anyone have experience with Re-write, and should it work with the scenario described? (maybe include some examples?) If so, we'll keep at it. If not, we'll look at other ways, although we're running out of them.

Thanks in Advance.

Gregg

windows-server-iis-configuration
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

lextm avatar image
0 Votes"
lextm answered

No, impossible.

To fix invalid links in PDF or other complex file format, you need to use specific tools (Adobe Acrobat for instance). You cannot rely on IIS URL Rewrite.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BruceZhang-MSFT avatar image
0 Votes"
BruceZhang-MSFT answered BruceZhang-MSFT commented

Hi @GreggDow-9230 ,

For embedded links, I recommend that you use the outbound rules in URL rewriting.

For example, if you already have a complex legacy Web application or a Web application that you cannot make modifications to, then the task of fixing all the URL links in the application can be very time-consuming, or not feasible at all.

This is when outbound URL rewriting can help. Outbound URL rewriting can fix the links on a fly in the response generated by an application.

However, UNC path is different from FQDN. UNC path is a format like \\server\xyz and URL is http://hostname/abc. So it is unlikely to rewrite the UNC path. If your team can modify the UNC path to the URL format, then outbound rules will help a lot for embedded URLs.



If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.


Best regards,
Bruce Zhang

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Bruce. They are mostly PDF's with the embedded links. I guess I should have clarified further. Many of the links are a combination of URL and UNC, such as "HTTP://ServerName/sharedfolder/folder/filename.pdf, but again without FQDN.

We'll try playing with the outbound rules to see if it might work.

Thanks.

Gregg


0 Votes 0 ·
BruceZhang-MSFT avatar image BruceZhang-MSFT GreggDow-9230 ·

Hi @GreggDow-9230 ,

If the UNC more like the format of URL, I think outbound rules will work.

0 Votes 0 ·