diff --git a/.htaccess.sample b/.htaccess.sample
index db1427b9317a0f0480076a10c77b16463b1c9bec..9c92873d5868b5b734724b00b0f94d0dfec179eb 100644
--- a/.htaccess.sample
+++ b/.htaccess.sample
@@ -112,7 +112,7 @@ DirectoryIndex index.php index.html index.htm
   # RewriteMap drupal prg:<DRUPAL_ROOT>/rewrite.php
   # Do not uncomment the previous line.  Only the next two.
   # RewriteCond %{REQUEST_FILENAME} !-f
-  # RewriteRule (.*) ${drupal:%{HTTP_HOST};delim;%{REQUEST_URI};delim;$1}
+  # RewriteRule (.*) ${drupal:%{HTTP_HOST};delim;%{REQUEST_URI};delim;$1} [DPI]
 
   # Pass all requests not referring directly to files in the filesystem to
   # index.php. Clean URLs are handled in drupal_environment_initialize().
diff --git a/sites/all/modules/unl/cron.php b/sites/all/modules/unl/cron.php
index 32bfa80508fdb593559db89647ef35c3a1ee9bb7..063732dfe4cd37e50c256825f3ebf0e5d4522121 100644
--- a/sites/all/modules/unl/cron.php
+++ b/sites/all/modules/unl/cron.php
@@ -326,13 +326,14 @@ function unl_add_site_to_htaccess($site_id, $site_path, $is_alias) {
     throw new Exception('Unable to find stub site entry in .htaccess.');
   }
   $new_htaccess = substr($htaccess, 0, $stub_pos)
-                . "  # %UNL_START_{$site_or_alias}_ID_{$site_id}%\n";
-  foreach (array('misc', 'modules', 'sites', 'themes') as $drupal_dir) {
-    $new_htaccess .=  "  RewriteRule $site_path$drupal_dir/(.*) $drupal_dir/$1\n";
-  }
-  $new_htaccess .= "  # %UNL_END_{$site_or_alias}_ID_{$site_id}%\n\n"
-                 . $stub_token
-                 . substr($htaccess, $stub_pos + strlen($stub_token));
+                . "  # %UNL_START_{$site_or_alias}_ID_{$site_id}%\n"
+                . "  RewriteRule {$site_path}misc/(.*) misc/$1\n"
+                . "  RewriteRule {$site_path}modules/(.*) modules/$1\n"
+                . "  RewriteRule {$site_path}sites/(.*) sites/$1 [DPI]\n"
+                . "  RewriteRule {$site_path}themes/(.*) themes/$1\n"
+                . "  # %UNL_END_{$site_or_alias}_ID_{$site_id}%\n\n"
+                . $stub_token
+                . substr($htaccess, $stub_pos + strlen($stub_token));
 
   file_put_contents(DRUPAL_ROOT . '/.htaccess', $new_htaccess);
 }