Skip to content

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

@ericras

Description

@ericras

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions