Skip to main content.
home | support | download

Back to List Archive

Re: Please fix badlinks

From: Peter Farmer <peter.farmer(at)not-real.zveno.com>
Date: Tue Feb 22 2005 - 01:14:40 GMT
On Tuesday 22 February 2005 2:11 am, Bill Moseley wrote:
> On Mon, Feb 21, 2005 at 09:26:43AM -0800, Peter Ensch wrote:
> > I love the SWISH-E website redesign but please fix the
> > links to search.cgi/swish.cgi on the documentation page.
> > Both are returning 'forbidden: Permission denied'
>

> The problem there is the server is globally for setup cgi scripts and the
> reason those don't work is because they have .cgi in their name and
> they are not executable.  Oops.
>
> I set that directory with .htaccess to SetHandler default-content but
> then they have .html files set up as x-server-parsed (globally!),
> which any reasonable browser (other than IE) won't display.  People
> using IE for developing sites are often clueless to content-type problems.
>

You've noticed that too huh 8-) .  

> $ HEAD http://swish-e.org/docs/swish.cgi.html | grep Content-Type
> Content-Type: text/x-server-parsed-html
>
> I'm on the road right now and typing and driving is hard at the same
> time.  I'll see if I can figure out what .htaccess settings will fix
> it.  I tried overriding with Addtype for .html but that didn't work.
> I'm open for suggestions, too, as I'd rather not be spending my
> vacation time reading the apache docs.  Believe it or not.

Assuming the .cgi extension has been globally mapped to the handler 
"cgi-script" (from mod_cgi)  and normally  the .html extension is mapped to 
the MIME-type "text/html", then the files  *.cgi.html will be associated with 
both the "cgi-script" handler and "text/html" MIME-type. The handler will 
have precedence here and process the file as a cgi script ..

So you need to either override the handler with another handler or in this 
case I'd say you want to remove any handler association :

RemoveHandler .cgi

That should leave it to be handled via the default handler . 

Peter Farmer
Received on Mon Feb 21 17:14:48 2005