On 04-May-15 06:09, Rainer Canavan wrote:
2015-05-01 16:00 GMT+02:00 David A. Cobb <superbis...@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.
Ahh. I was hoping there was something I had overlooked.
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
Lua sounds good. I will look into that one. Back when my brain was
younger, I earned my keep programming so it is maybe possible.
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.
Neither was I. I thought that once I captured the localhost URL, I
could just serve that file. But I think that just adds work duplicating
functions already in the browser.
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.
In the general case, it would be hairy indeed. But I maintain a pretty
simple-minded mapping for documents I harvest.
rainer
Many thanks, Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org