Solved

Accessing files remotely

Posted on 2014-04-07
4
136 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
[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 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 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