unlcms / UNL-CMS

Drupal 7 implementation at the University of Nebraska–Lincoln
http://unlcms.unl.edu/
GNU General Public License v2.0
4 stars 13 forks source link

Add [DPI] to RewriteMap directive for newer apache versions #946

Open ericras opened 5 years ago

ericras commented 5 years ago

RewriteMap of a .css file that has a .css.gz version isn't working for me on apache 2.4.34.

http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_dpi

This seems to work

  # THIS SECTION IS FOR UNL SUBSITES
  # DO NOT EDIT!!!!

  # Add the following line to your httpd.conf
  # RewriteMap drupal_subsites txt:<DRUPAL_ROOT>/.htaccess-subsite-map.txt
  # Do not uncomment the previous line.

  RewriteRule .*/cron.php cron.php
  RewriteRule .*/update.php update.php
  RewriteRule ^(.*?/(misc|modules|sites|themes))(.*) ${drupal_subsites:$1|$1}$3 [DPI]

  RewriteCond ${drupal_subsites://%{HTTP_HOST}%{REQUEST_URI}|NOT_FOUND} !^NOT_FOUND$
  RewriteRule (.*) ${drupal_subsites://%{HTTP_HOST}%{REQUEST_URI}|$1} [R,L]

  # END SUBSITE AREA.