httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Canavan <rainer.cana...@sevenval.com>
Subject Re: [users@httpd] Handling MS "Internet Shortcuts" and "Links"
Date Mon, 04 May 2015 10:09:51 GMT
2015-05-01 16:00 GMT+02:00 David A. Cobb <superbiskit@cox.net>:
[...]
> However, if I click the URL file in a "Directory List" served from Apache, I
> get the plain text file displayed.  I can go to the target with one or two
> extra steps, but it's a PITA.


It's a text file, so that's the expected result, since there are no special
handlers for .url-Files in httpd.

> It seems what I should do is to parse the file in the server and send a
> "Permanently Moved To" redirection to the browser.

I don't think you can achieve this with the likes of mod_rewrite, mod_setenvif
etc. It should require a proper program, e.g. via CGI, mod_perl
mod_php or the likes, plus probably a RewriteRule to start the script
whenever a .url file is requested. Or maybe mod_lua and a LuaOutputFilter.

> Or, I suppose, I could simply do the redirection; but somehow that feels less safe.

Not sure what you're trying to say here.

> Now, if I can be allowed a second question in the same post, can I do the
> same thing with Microsoft ".lnk" shortcuts?  It would be a simple script
> operation to transform the local FileSystem path to a "localhost:8080/"
> path.

That's actually not trivial in the general case, since it's not
necessarily obvious
how file system paths map to URLs.

rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message