Support Requests item #547781, was opened at 2002-04-23 16:56
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=203152&aid=547781&group_id=3152

Category: Configuration: Other
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alan C. Hines (alanhines)
Assigned to: Nobody/Anonymous (nobody)
Summary: parsing symlinks as adps

Initial Comment:
please excuse the vague and overlong description of
my issue here, I've done very little configuration of
aolserver myself:

Am trying to use symlinks for URLs, so to avoid
having to append the ".adp" extension to every
filename that I want parsed as an adp.  The symlink
points to a "handler" adp, which uses the adp_name
value to query the database for the appropriate text
to send out to the client browser.

So have edited this line of nsd.tcl:

#
# ADP (AOLserver Dynamic Page) configuration
#
ns_section "ns/server/${servername}/adp"
ns_param   map             "/*.adp"  ;# Extensions to
parse as ADP's.
ns_param   map             "/*"  ;# Extensions to
parse as ADP's.

Now, this DID work - the symbolic links -
www.server.com/foo - did exactly what they were
supposed to do, symlinking to the page handler adp,
which determined which symlink had refered it, and
did the appropriate thing.

The problem is, when setting the ns_param map value
to "/*" - that is, "treat everything as an adp" -
then AOLServer ALSO parses images file as adps.  The
result - broken images.  ALL images broken on the
page output.

So what I would like to do is configure AOLServer to,
yes, treat everything as an ADP - EXCEPT for files
with the following extensions:

.gif
.jpg
.png
.pdf
.swf

And so on for any binary files I might want AOLServer
to serve.

Can anyone give me some direction as to what
configuration changes / parameters might accomplish
what I'm trying to do?

Thanks in advance,


----------------------------------------------------------------------

Comment By: Andrew Piskorski (apiskors)
Date: 2002-04-24 10:44

Message:
Logged In: YES
user_id=43168

Alan, you may also want to check out the "abstract URL"
feature of the OpenACS 4.x request processor.  It lets you
serve up the URL "http://mysite.com/foo";, where the file foo
can in fact be foo.html, foo.tcl, foo.adp, or whatever else,
without you ever showing the file extension in the URL -
nice.

For more mention of this, see e.g.:

http://openacs.org/doc/openacs-4/rp-design.html

http://www.arsdigita.com/doc/abstract-url.html

http://www.arsdigita.com/doc/core-arch-guide/request-processor.html


----------------------------------------------------------------------

Comment By: Brady Wetherington (camusatan)
Date: 2002-04-24 00:36

Message:
Logged In: YES
user_id=358263

I've written a module (I call it 'quickpath') to do exactly
what you specify there, and a little more - there are
actually some other yicky things that come up when you try
to set "/*" as all ADP's. I run this module on my
development and my production servers.

I don't know the 'proper' way to send it to you via
sourceforge, but send me an email at [EMAIL PROTECTED] and
I'll toss you the patch.

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=203152&aid=547781&group_id=3152

Reply via email to