Apache Server configuration support - SetHandler rewrites URI used by Location?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > August 2006 > SetHandler rewrites URI used by Location?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SetHandler rewrites URI used by Location?
Andy Buckley

2006-08-01, 7:28 pm

I'm using a couple of scripts to do pre-processing of files with
certain file extensions and then wrapping the output in a
SetOutputFilter chosen according to the URL. Example:

## ReStructuredText handler
ScriptAlias /test-cgi-bin/ /cedar/testlocal/cgi-bin/
Action rst-handler /test-cgi-bin/rst-filter
AddHandler rst-handler .rst

## /foo contains .rst files
<Location /foo>
SetOutputFilter blah
</Location>

This seems not to work: the RST handler processes the RST into HTML
nicely but then the location isn't matched, because the handler changes
the URI (I'm not sure which variable gets read to do this). I can fix
it for this example by adding this:

<Location /test-cgi-bin>
SetOutputFilter blah
</Location>

but this is pretty ugly and probably not flexible enough for me in
general. Is there a way to avoid the handler rewriting the URI that
Location uses? I'm using Apache 2.0.52 on a Scientific Linux system.

Cheers,
Andy

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com