views:

40

answers:

1

I have the following Apache directives to process every *.xml file on the web server:

AddHandler ae_xslt .xml     
Action ae_xslt test.php

DirectoryIndex index.xml index.php index.html

The problem is that I get an internal server error (500). When I look in the Apache error logs I get the following error:

Htaccess: Action takes two arguments, a media type followed by a script name

I add the handler 'ae_xslt' associated with xml files and then I set the script 'test.php' with handler 'ae_xslt'. Thus every *.xml file should pass through the script 'test.php'

I don't see what's wrong with this action! What do I miss here?

A: 

Let me explain the solution.

The thing was I actually had the following piece of code:

AddHandler ae_xslt .xml # here some comments

Now Apache thinks there are actually 3 parameters, instead of the required 2. Of course you may add comments but you are not allowed to comment on the same line as the code!

Kris Van den Bergh