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
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 82

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 82

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

617 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