0

we have a internal tool a web php app we use . There are some static html files i want to link it to, which are on another machine . right now i am doing like this

<a href="file:////123.145.226.8/Projects/E-Reports/E-Report-' . $projectNo . '/Report.html" target="_blank">E-Report</a>

which works just fine in IE !!!!!!!!!!!!!!!!! but not in firefox any ideas ? This is a internal tool so the machine on which static files are present is always available. thanks

sid
  • 61
  • 6
  • 1
    any reason a normal http://123.145.226.8/Projects/E-Reports/E-Report- link won't work? – totallyNotLizards Mar 12 '12 at 15:21
  • not that i can think of and it works for IE but not in firefox that is what throws me off. – sid Mar 12 '12 at 15:24
  • Next to security settings, you must use the correct URI (your question shows that you love to repeat characters, but as with written langauge and exclamation marks, inside URIs too much is too much as well), see [File URI Scheme](http://en.wikipedia.org/wiki/File_URI_scheme) - this page has remarks for different browsers as well. – hakre Mar 12 '12 at 15:28
  • Looks to me like this only works on IE because it will translate the forward slashes after `file://` into backslashes; and then it will interpret `\\ ` as a network (samba) path. That only works because IE's tight integration into windows. For instance, on konqueror on linux, the same would work with `smb://`. Long story short: what you're doing is not standardized and a bad idea, if you ask me. Accessing samba shares is not a browser's job. – Joeri Hendrickx Mar 12 '12 at 15:33

2 Answers2

2

You should install a webserver on the machine 123.145.226.8. If it's a Windows machine, try xampp and place the files in the htdocs directory. Now you can visit the HTML page with http://123.145.226.8.

If it's running linux, use apt-get install apache2 or yum install httpd (depending on operating system) and place your files in /var/www/.

Devator
  • 3,686
  • 4
  • 33
  • 52
  • It works in IE but not in Firefox !!! which is very strange . I cant think of any thing that might cause this not to work in firefox . I have gone through firefox options many times nothing stands out . Thank for help .. – sid Mar 12 '12 at 15:26
  • Firefox doens't work with `file://`, you should really use a webserver. – Devator Mar 12 '12 at 15:42
0

Unfortunately this is the default behavior for Firefox. You must configure the browser manually. See this thread

Firefox Links to local or network pages do not work

Community
  • 1
  • 1
Reinaldo
  • 4,556
  • 3
  • 24
  • 24