Solved

Accessing files remotely

Posted on 2014-04-07
4
132 Views
Last Modified: 2014-04-08
I wasn't sure which TA to put this question into, but it involves reading files from ColdFusion.

Our salespeople often have to access our intranet when out on the road, and they need to be able to view files (pdfs)  These are accessed in the intranet by hyperlinks in the style of

<a href="\\appserver\files\filename" target="_blank">Filename</a>

The links work fine in-house, but not when accessed remotely.

How do I change the hrefs to  http links so they will work both in-house and remotely?

The intranet is accessed internally as http://appserver/intranet/default.cfm, but remotely as https://remote.xyz.com/intranet/default.cfm
0
Comment
Question by:jdthedj
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39984995
Make sure the links are relative and not full.

e.g. instead of the links being href="http://appserver/intranet/default.cfm", make them href="/intranet/default.cfm".

You will have to do this with all your links.
0
 
LVL 3

Author Comment

by:jdthedj
ID: 39985082
Thanks for the reply Rodrigo.  

I have tried your suggestion, but when I look in the status bar of IE it shows the url resolved to http://appserver/files/filename
0
 
LVL 4

Accepted Solution

by:
Rodrigo Munera earned 500 total points
ID: 39985739
Yeah, the browser will resolve the URL to the current domain when using relative href. That's why it will work for both urls.
If you view the page from http://appserver/ the client will resolve the urls to http://appserver/files/filename. If you view the pages as http://remote.appserver.org/ the urls will resolve as http://remote.appserver.org/files/filename in the status bar. The browser is smart enough to make that distinction.
0
 
LVL 3

Author Comment

by:jdthedj
ID: 39987527
Thanks Rodrigo.  You have pointed me to the right place.  I have discovered, but don't know why, CF can look down the folder tree, but not up it.  We've had to move the files within the tree to make things work, and then there's the headache of permissions.....
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

10 Experts available now in Live!

Get 1:1 Help Now