Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
272 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 83

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 83

Accepted Solution

by:
David Johnson, CD, MVP earned 2000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

719 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