Skip to main content
Inspiring
December 3, 2008
Question

Relative or Absolute Linking to local network

  • December 3, 2008
  • 2 replies
  • 488 views
Hi. I am trying to put a link on a web page that we use internally at work using cold fusion to open a file that is on our internal network. I'm just wondering how I could get this work? What it's doing when I create an a href is it's doing a relative link, but I don't want that address to show up in the link. Is there a way to strip out that part of the address? I will not show the entire path, but just a little so you can understand what I'm talking about. I want just this to show in the address bar when I click the link: \\Server\Server_Folder\Sales What shows up instead for the link is: http://192.168.0.2....\\Server\Server_Folder\Sales
How do I get rid of the http://192.168.0.2...?
Can someone please help me? Thanks.

Andy
    This topic has been closed for replies.

    2 replies

    Inspiring
    December 4, 2008
    Hi,

    What you are looking for may not be possible.

    Your server is sending a html page back to the users browser with a link. If you click the link, it needs to tell the browser from where to get the file.
    http://WhichServer/WhichFolder/WhatsTheFilename.Extension

    If you do not provide the WhichServer information to the browser, how should it know where to get the file?

    There are 2 things you can do:
    1) Masking
    The link in your page could open another page on your server that actually opens the file via javascript
    => adds occasional problems, and still not totally secure
    (google for: javascript window.open)
    2) Tunneling
    For this, you have to create CF scripts on your server that would get the file from your network servers, and then would provide a temporary link to the customer where they can download it
    (google for: cfcontent)

    cheers,
    fober
    Inspiring
    December 3, 2008
    You could try a findnocase() to get the position of \\, then strip off
    everthing before it

    Steve

    "jamie61880" <webforumsuser@macromedia.com> wrote in message
    news:gh6qds$7p$1@forums.macromedia.com...
    > Hi. I am trying to put a link on a web page that we use internally at work
    > using cold fusion to open a file that is on our internal network. I'm just
    > wondering how I could get this work? What it's doing when I create an a
    > href is
    > it's doing a relative link, but I don't want that address to show up in
    > the
    > link. Is there a way to strip out that part of the address? I will not
    > show the
    > entire path, but just a little so you can understand what I'm talking
    > about. I
    > want just this to show in the address bar when I click the link:
    > \\Server\Server_Folder\Sales What shows up instead for the link is:
    > http://192.168.0.2....\\Server\Server_Folder\Sales
    > How do I get rid of the http://192.168.0.2...?
    > Can someone please help me? Thanks.
    >
    > Andy
    >

    Inspiring
    December 3, 2008
    Steve,
    Can you show me an example of how to use findnocase() and then how to strip things off? I don't understand how to use these. I looked at the help menu, but I don't understand it. Thanks.

    Andy