Solved

How can I redirect certain URLs to other URLs that point to files hosted externally? I am using IIS on Win Server 2012

Posted on 2014-12-02
4
256 Views
Last Modified: 2014-12-07
I was asked to redirect http request for a site on our internal web server to a different location (external server that is now hosting the files that were being served by our server). I initially used HTTP Redirect and that works if the person has logon credentials for the new location.

We need to use specific urls for guest access and so I though I could use URL Rewrite but not sure how to achieve this. Essentially I would like to redirect a URL in the format remote.ourorg:port/directory/file.pdf to ourorg.sharepoint.com/rest-of-guest-url.
0
Comment
Question by:phiriz
  • 2
  • 2
4 Comments
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40480039
the first redirect goes to the other web server, so on the other webserver you would have to do a redirect back to your sharepoint server OR use absolute url's
0
 

Author Comment

by:phiriz
ID: 40485990
Hi David,

Thanks for the reply. Not sure I completely understand. There is only one web server that we have control over (our web server) The place the files are being moved to is Office 365 sharepoint service which generates specific URLs for guess access. Would it be best to do away with HTTP Redirect and use the URL Rewrite with absolute URLs. One thing I did try to so was to try to match the whole current URL (not sure that this is right) and then redirect to the new URL. I am really new to Rewrites and redirects and so some guidance would help heaps.
0
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40486095
a redirect does just that it takes all requests for something and sends these requests somewhere else.
i.e. 301 redirect www.example.com www.fabricam.com all of the requests will go to www.fabricam.com from www.example.com

The URL rewriter simply takes the incoming URL and if it matches a certain pattern it converts it to a URL that the server understands (assuming your rewrite rules are correct).

i.e. http://www.example.com/powershell.aspx converts to http://www.example.com/2014/12/12/blogpost.aspx
Url rewrite rules do not rewrite the outgoing content, only the incoming URL and the address in the users address bar doesn't change.

you said that guests do not have access to the remote server since they don't have a login account.  If the reference is on the remote server which you don't have access to then pretty much you have to use absolute references. i.e.
<a href="http://mydomain.sharepoint.com/collection/abc.pdf" Abracadabra PDF" />
0
 

Author Closing Comment

by:phiriz
ID: 40486228
Thanks David. I managed to get it all done. Easier than I thought it would be once I knew what needed to be done.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now