Solved

Accessing files remotely

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

15 Experts available now in Live!

Get 1:1 Help Now