none
How to Address a Hyperlink on a Shared Drive RRS feed

  • Question

  • I have created an Intranet site, using EW4, for internal company usage.  When I Open the Intranet site from my desktop computer, the hyperlinks work fine.  When someone else on a different computer tries to launch a hyperlink to a file, the hyperlink doesn't work.   I have tried several suggestions that I found searching thew web, but none work.  I am hoping someone here may be able to help.

    Here is the shared drive path I am working with:

    Shared$ (\\main)(S:)\ALLSHARE\SERVICE\Service Trip Reports\file.xxx

    Here is what a sample hyperlink looks like when I insert a hyperlink in EW4:

    file:/main/shared$/ALLSHARE/SERVICE/Service Trip Reports/Miltec Field Service Report Template Rev B.pdf

    Thanks, Bob

    Wednesday, October 17, 2012 11:55 AM

All replies

  • I fought with this on our intranet site too. I don't remember where I came across a solution, but somebody provided an answer that works for me. I have to manually edit any links to files on shared drives. I now use links in this format: file:///\\server_name\shared_drive_name\folder_name\file_name.

    I know it looks bizarre, but it forces the server to interpret the path correctly. If I try any other format, I get the same results you do. Give it a try and see if that works for you.

    Jim


    'Tis the business of little minds to shrink; but he whose heart is firm, and whose conscience approves his conduct, will pursue his principles unto death. Thomas Paine

    Wednesday, October 17, 2012 4:09 PM
  • Thanks for answering Jim.  Tried your above solution, but the hyperlink reverts to this (file://main/shared$/ALLSHARE/SERVICE/Service%20Trip%20Reports/Miltec%20Field%20Service%20Report%20Template%20Rev%20B.pdf) as soon as I click OK in the Edit Hyperlink box.


    Bob M

    Wednesday, October 17, 2012 8:32 PM
  • As Jim said, edit it by hand.  Don't use the "edit hyperlink box".  EW has no idea what kind of link you are trying to make.

    CODE VIEW, not DESIGN VIEW.  Fix the links by hand.

    Wednesday, October 17, 2012 9:48 PM
  • Aha.... I'll try that.  Thanks.

    Bob M

    Wednesday, October 17, 2012 10:17 PM
  • OK, tried the above. Still doesn't work.

    Here is the hyperlink code, manually entered in the code view window:

    <a href="file:///\\main\shared$\ALLSHARE\SERVICE\Service Trip Reports\Miltec Field Service Report Template Rev B.pdf">

    After publishing to server, from IE9, here is what the Intranet hypelink becomes:

    file://main/shared$/ALLSHARE/SERVICE/Service%20Trip%20Reports/Miltec%20Field%20Service%20Report%20Template%20Rev%20B.pdf

    Let me ask this, is this an EW issue or a Windows Server issue, or if I tried this, say through Dreamweaver CS6, would I get the same results?

    I have to get this thing online soon.

    Thanks,

    Bob


    Bob M

    Thursday, October 18, 2012 8:05 PM
  • It is not an EW issue. HTML is HTML, period. I use DW CS6 myself, and I can't imagine this changing as a result of using DW instead of EW.

    One thing to note is that you should NOT use spaces in file and folder names used for the Internet. They are not valid in URLs, and end up being encoded (that's what all those "%20" characters are; hexadecimal 20 is decimal 32, the ASCII code for the space character). Don't do that. Either use camelCase, PascalCase, or dashes or underscores to separate the words of file and folder names (I prefer dashes, because underscores vanish when links are displayed in browsers that underline links).

    Does the URL resolve properly (i.e. find and retrieve the PDF file) when you preview the page locally from your machine before publishing?

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.

    Thursday, October 18, 2012 9:49 PM
  • Yes, the hyperlink works perfectly in preview mode, and from IE straight from my machine, but not any other machines.

    Bob M

    Friday, October 19, 2012 12:28 AM
  • Does Shared$ (\\main)(S:)\ALLSHARE\SERVICE\Service Trip Reports\file.xxx work for them (not a link, just the same address for the share, directly)?
    Friday, October 19, 2012 12:49 AM
  • I think that I would be talking to my IT folks, the server guys. If you're saying that the link, which, as you say, is actually changed when you view it in IE versus what it is when created, yet still works fine from your workstation, it sounds like there are some squirrely mappings somewhere. Maybe different network segments? Domain controllers? Group policies? Something...

    The thing is, it's been several years, over a decade, since I worked on an intranet, and in those circumstances, facing a situation like this, I would be working with my internal guys. It sounds like a pathing issue peculiar to your network, and I doubt that we can really offer much here, since we are, by and large, independent developers who work with external hosting providers, rather than corporate intranets. Sorry.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.

    Friday, October 19, 2012 1:14 AM
  • Yes, the above link works directly with every machine, with the exception that (S:) may be a different mapping on a different machine. And it would be impossible to remap every machine for (S:), because we have outside people who log in from VPN.  However, (S:) is never referenced in the hyperlink anyway.


    Bob M

    Friday, October 19, 2012 12:12 PM
  • Referring to your comment about spaces between the file name words, I tried simple one word file names as well.  No difference. I am working directly on a Windows Server 2008, so it doesn't care about spaces in the file names.

    Bob M

    Friday, October 19, 2012 12:17 PM
  • Referring to your comment about spaces between the file name words, I tried simple one word file names as well.  No difference. I am working directly on a Windows Server 2008, so it doesn't care about spaces in the file names.

    Bob M

    Fine. It is still not considered best Web development practice to use spaces in file names, but if you want to do it, hey, whatever blows your skirt up...

    As far as this issue is concerned, I can see no way that we can duplicate your environment for testing, nor, given the way that we use EW, any way that we can resolve your issue. EW appears to be resolving your URL at save time the way that it views the path to it from your machine. That that is different from the way it would be resolved from machines elsewhere in your internal network is not the fault of EW, and I know of no way that anything that can be done with or within EW can possibly resolve the issue that the same URL resolves differently from different places within or outside the network. That appears to be an issue of inconsistent internal network architecture or mapping, and that is something completely beyond the control of EW.

    Good luck...


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.

    Friday, October 19, 2012 7:10 PM