subdir.tpl.php 1.34 KB
Newer Older
1 2 3 4 5 6 7
<?php
$aegir_root = drush_get_option('aegir_root');
if (!$aegir_root && $server->aegir_root) {
  $aegir_root = $server->aegir_root;
}
?>

8
Alias /<?php print $subdir; ?> <?php print $this->root; ?>
9

10
<Location /<?php print $subdir; ?>>
11 12 13 14 15 16 17 18 19 20 21 22 23

  SetEnv db_type  <?php print urlencode($db_type); ?>

  SetEnv db_name  <?php print urlencode($db_name); ?>

  SetEnv db_user  <?php print urlencode($db_user); ?>

  SetEnv db_passwd  <?php print urlencode($db_passwd); ?>

  SetEnv db_host  <?php print urlencode($db_host); ?>

  SetEnv db_port  <?php print urlencode($db_port); ?>

24 25 26
  <IfModule mod_rewrite.c>
  RewriteEngine on

27 28 29
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
anarcat's avatar
anarcat committed
30
  RewriteRule ^<?php print $this->root; ?>/(.*)$ /<?php print $subdir; ?>/index.php?q=$1 [L,QSA]
31
  </IfModule>
32 33 34
</Location>

# Error handler for Drupal > 4.6.7
35
<Directory ~ "sites/.*/files">
36 37 38 39 40 41
  SetHandler This_is_a_Drupal_security_line_do_not_remove
</Directory>

# Prevent direct reading of files in the private dir.
# This is for Drupal7 compatibility, which would normally drop
# a .htaccess in those directories, but we explicitly ignore those
anarcat's avatar
anarcat committed
42
<Directory "<?php print $this->site_path; ?>/private/" >
43 44 45 46 47
   SetHandler This_is_a_Drupal_security_line_do_not_remove
   Deny from all
   Options None
   Options +FollowSymLinks
</Directory>