Apache Directive to Combine .js and .css Files

Billy Heaton 1 min read

Allows concatenation from files ending with .js and .css

# In styles.combined.css use...
#   <!--#include file="reset.css" -->
#   <!--#include file="layout.css" -->
# these will included into this single file

<FilesMatch ".combined.js">
        Options +Includes
        SetOutputFilter INCLUDES
</FilesMatch>
<FilesMatch ".combined.css">
        Options +Includes
        SetOutputFilter INCLUDES
</FilesMatch>

About the Author

Billy Heaton
Billy Heaton

Software engineer with two decades of experience who favors Ruby and JavaScript to build web applications