Link to home
Start Free TrialLog in
Avatar of mick_rouse
mick_rouseFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Adding a UNC link to a printer in a HTML page.

I'm currently writing a page for users to give them HTML links to printers which we have created on our print cluster.

the link i'm trying to create is  "\\SERVERNAME\PRINTERNAME", but whenever the i'm trying to add the link, it appears as "http:///SERVERNAME/PRINTERNAME".

Is there any way of presenting the information into HTML so that it loses the HTTP:// and doesn't reverse the "\"'s ???
 e.g. :

\\SERVERNAME\PRINTERNAME

Appears in the web page.

Many Thanks in advance

<TITLE>Printers</TITLE>
</HEAD>
<BODY>
<p><A HREF="/\\wvc-prtv-01\wvc-01-01-hplj4250">\\wvc-prtv-01\wvc-01-01-hplj4250</A></p></BODY>
</HTML>

Open in new window

Avatar of Matthew Kelly
Matthew Kelly
Flag of United States of America image

If you put "file:///" in the front of the"\\server-name" it will open from internet explorer (seems pretty slow though).

As you posted firefox as well that may not help you.

Do you happen to have any control over the web server, and if so, is it Apache?

If it is Apache you can add a server alias as I have done before for a project. See the snippet code and add something similar to httpd.conf. This will make it so going to "http://<server-name>/data" go to "//company-server/Data/"

You need to have the mod_alias module loaded, so

"LoadModule alias_module modules/mod_alias.so"

Needs to be in the httpd.conf file as well.

Untested with printers, but works with shared drives.
Alias /data/ "//company-server/Data/"
<Directory "//company-server/Data/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Open in new window

Avatar of mick_rouse

ASKER

Unfortunately it's actually hosted on a customers server, so the addition of any other modules is unfortunately out of the question :(
ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for that.

I've decided to go down that route.
Your welcome!  I'm glad I could help.

I noticed the B grade.  Did you still have a question or need help with this?  If so let me know and I will be happy to provide what I can.  There really wasn't much to this answer but I thought my comment was pretty complete with why and an alternative.  If a mistake was made when you closed this or you have a question about grading on EE then let me know.  There is some good info on grading at https://www.experts-exchange.com/help.jsp#hi97 if you are interested or haven't seen it.  It is nice to always have a chance to earn the A or at least know why it wasn't. :)

Thanks for the fun question.

bol