WordPress.org

Forums

How to link files on network or intranet site? (11 posts)

  1. yhowardyang
    Member
    Posted 3 years ago #

    Hi,

    How to link files on the network for intranet?
    I want to link file://host/files/test.htm for example.

    It works fine if i type in ie or firefox, but within word press, the link doesn't work.
    <a> test </a>

    Any ideas?

    thanks,

  2. webjunk
    Member
    Posted 3 years ago #

    Your link did not work. Try again.
    Even though it is local you should still use "http" instead of file. Unless you have a specific reason not to.

  3. yhowardyang
    Member
    Posted 3 years ago #

    Just tried it, didn't work.
    Any other ideas?

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    You can't link to files without http://

  5. yhowardyang
    Member
    Posted 3 years ago #

    in my browser, i can link and open files on the intranet network with
    file://host/file1.htm fine. I can not open a file with "http://host/file1.htm" on the intranet network.

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    in my browser, i can link and open files on the intranet network

    That's because you're within an intranet and using a file system. A web site is a separate entity - even if it is hosted within the intranet - and cannot use the file:// protocol. You will either have to host the files on the server or include the files in web pages using some other method.

  7. yhowardyang
    Member
    Posted 3 years ago #

    my site is only for intranet, not for the open www. I'm able to use the file:// protocol with the browsers but it doesn't work when coded in wordpress. any idea why?

    thanks.

  8. webjunk
    Member
    Posted 3 years ago #

    it sounds like you have hit Browser security. Most modern browsers will not execute a file: link from within a http: (delivered) page. That is why you need to use http: But the pathing/URI may have to be changed. Keep in mind http: is delivered through the web server while file: is NOT delivered but opened directly by the client as a local file. This is why file: is a security issue and should never be used.
    The browsers will launch the file but not within an http: delivered page.

  9. yhowardyang
    Member
    Posted 3 years ago #

    ok thanks for the info. looks like there is no solution for this.

  10. rhjhendr
    Member
    Posted 3 years ago #

    hi esmi, yhowardyang, webjunk,

    i kinda have the same problem as yhowardyang has/had. I made a wordpress site which is not for the open net, but is used as intranet. So it is online..

    I want to create a page named: 'shortcuts'. On this page I want shortcuts to files on my local network. However, after I made the link, it simply will not open. If copy and paste the link in a new browser, it works without a problem.

    Example given:

    file

    I already used a lots of variants; forward slashes, backward slashes, multiple slashes, without 'file:' etc. etc. Does someone has the solution how I can make this work?

    Thanks,

    Remy

  11. esmi
    Forum Moderator
    Posted 3 years ago #

    Please post a new topic.

Topic Closed

This topic has been closed to new replies.

About this Topic