Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.