0

I'm aware that you can configure by file type (first line below) but i'd like to be more specific. I tired the 2nd line below, but didn't seem to work. Am I doing something wrong?

#AddHandler server-parsed .html
# Would like to only parse *.dyn.js, instead of all *.js files 
AddHandler server-parsed .dyn.html

1 Answer 1

1

It is not how you should do it. Here's why: according to the mod_mime documentation, apache treats the all of the sections of the filename which begin with dot as an extension. In the example you provided, if you have a file, say, default.dyn.html, it is treated as a .dyn and as a .html file simultaneously. If simultaneous handling happens to be impossible, apache processes the extensions from right to left. So, you can't define an "extension" which contains a dot.

What you should do instead, it to define the "server-parsed" handler for the .dyn extension only. In this way, if you have a .dyn.html file, it will be registered to the server-parsed handler and to the text/html mimetype. Since these can coexist nicely, the file will be parsed, and will be served as an html page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .