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
259 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 79

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 79

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 Searchbox Branding 11 73
Determine Server Specs for IIS.7 Website 4 54
Public IP Address Amazon Servers 2 56
Setup IIS website to use ADFS authentication 25 80
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 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