Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

Accessing files remotely

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
jdthedj
Asked:
jdthedj
  • 2
  • 2
1 Solution
 
Rodrigo MuneraCommented:
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
 
jdthedjAuthor Commented:
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
 
Rodrigo MuneraCommented:
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
 
jdthedjAuthor Commented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now