| 
webmaster@1
 | 
     1 # | 
| 
webmaster@1
 | 
     2 # Apache/PHP/Drupal settings: | 
| 
webmaster@1
 | 
     3 # | 
| 
webmaster@1
 | 
     4  | 
| 
webmaster@1
 | 
     5 # Protect files and directories from prying eyes. | 
| 
webmaster@1
 | 
     6 <FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$"> | 
| 
webmaster@1
 | 
     7   Order allow,deny | 
| 
webmaster@1
 | 
     8 </FilesMatch> | 
| 
webmaster@1
 | 
     9  | 
| 
webmaster@1
 | 
    10 # Don't show directory listings for URLs which map to a directory. | 
| 
webmaster@1
 | 
    11 Options -Indexes | 
| 
webmaster@1
 | 
    12  | 
| 
webmaster@1
 | 
    13 # Follow symbolic links in this directory. | 
| 
webmaster@1
 | 
    14 Options +FollowSymLinks | 
| 
webmaster@1
 | 
    15  | 
| 
webmaster@1
 | 
    16 # Customized error messages. | 
| 
webmaster@1
 | 
    17 ErrorDocument 404 /index.php | 
| 
webmaster@1
 | 
    18  | 
| 
webmaster@1
 | 
    19 # Set the default handler. | 
| 
webmaster@1
 | 
    20 DirectoryIndex index.php | 
| 
webmaster@1
 | 
    21  | 
| 
webmaster@1
 | 
    22 # Override PHP settings. More in sites/default/settings.php | 
| 
webmaster@1
 | 
    23 # but the following cannot be changed at runtime. | 
| 
webmaster@1
 | 
    24  | 
| 
webmaster@1
 | 
    25 # PHP 4, Apache 1. | 
| 
webmaster@1
 | 
    26 <IfModule mod_php4.c> | 
| 
webmaster@1
 | 
    27   php_value magic_quotes_gpc                0 | 
| 
webmaster@1
 | 
    28   php_value register_globals                0 | 
| 
webmaster@1
 | 
    29   php_value session.auto_start              0 | 
| 
webmaster@1
 | 
    30   php_value mbstring.http_input             pass | 
| 
webmaster@1
 | 
    31   php_value mbstring.http_output            pass | 
| 
webmaster@1
 | 
    32   php_value mbstring.encoding_translation   0 | 
| 
webmaster@1
 | 
    33 </IfModule> | 
| 
webmaster@1
 | 
    34  | 
| 
webmaster@1
 | 
    35 # PHP 4, Apache 2. | 
| 
webmaster@1
 | 
    36 <IfModule sapi_apache2.c> | 
| 
webmaster@1
 | 
    37   php_value magic_quotes_gpc                0 | 
| 
webmaster@1
 | 
    38   php_value register_globals                0 | 
| 
webmaster@1
 | 
    39   php_value session.auto_start              0 | 
| 
webmaster@1
 | 
    40   php_value mbstring.http_input             pass | 
| 
webmaster@1
 | 
    41   php_value mbstring.http_output            pass | 
| 
webmaster@1
 | 
    42   php_value mbstring.encoding_translation   0 | 
| 
webmaster@1
 | 
    43 </IfModule> | 
| 
webmaster@1
 | 
    44  | 
| 
webmaster@1
 | 
    45 # PHP 5, Apache 1 and 2. | 
| 
webmaster@1
 | 
    46 <IfModule mod_php5.c> | 
| 
webmaster@1
 | 
    47   php_value magic_quotes_gpc                0 | 
| 
webmaster@1
 | 
    48   php_value register_globals                0 | 
| 
webmaster@1
 | 
    49   php_value session.auto_start              0 | 
| 
webmaster@1
 | 
    50   php_value mbstring.http_input             pass | 
| 
webmaster@1
 | 
    51   php_value mbstring.http_output            pass | 
| 
webmaster@1
 | 
    52   php_value mbstring.encoding_translation   0 | 
| 
webmaster@1
 | 
    53 </IfModule> | 
| 
webmaster@1
 | 
    54  | 
| 
webmaster@1
 | 
    55 # Requires mod_expires to be enabled. | 
| 
webmaster@1
 | 
    56 <IfModule mod_expires.c> | 
| 
webmaster@1
 | 
    57   # Enable expirations. | 
| 
webmaster@1
 | 
    58   ExpiresActive On | 
| 
webmaster@1
 | 
    59  | 
| 
webmaster@1
 | 
    60   # Cache all files for 2 weeks after access (A). | 
| 
webmaster@1
 | 
    61   ExpiresDefault A1209600 | 
| 
webmaster@1
 | 
    62  | 
| 
webmaster@1
 | 
    63   # Do not cache dynamically generated pages. | 
| 
webmaster@1
 | 
    64   ExpiresByType text/html A1 | 
| 
webmaster@1
 | 
    65 </IfModule> | 
| 
webmaster@1
 | 
    66  | 
| 
webmaster@1
 | 
    67 # Various rewrite rules. | 
| 
webmaster@1
 | 
    68 <IfModule mod_rewrite.c> | 
| 
webmaster@1
 | 
    69   RewriteEngine on | 
| 
webmaster@1
 | 
    70  | 
| 
webmaster@1
 | 
    71   # If your site can be accessed both with and without the 'www.' prefix, you | 
| 
webmaster@1
 | 
    72   # can use one of the following settings to redirect users to your preferred | 
| 
webmaster@1
 | 
    73   # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: | 
| 
webmaster@1
 | 
    74   # | 
| 
webmaster@1
 | 
    75   # To redirect all users to access the site WITH the 'www.' prefix, | 
| 
webmaster@1
 | 
    76   # (http://example.com/... will be redirected to http://www.example.com/...) | 
| 
webmaster@1
 | 
    77   # adapt and uncomment the following: | 
| 
webmaster@1
 | 
    78   # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] | 
| 
webmaster@1
 | 
    79   # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] | 
| 
webmaster@1
 | 
    80   # | 
| 
webmaster@1
 | 
    81   # To redirect all users to access the site WITHOUT the 'www.' prefix, | 
| 
webmaster@1
 | 
    82   # (http://www.example.com/... will be redirected to http://example.com/...) | 
| 
webmaster@1
 | 
    83   # uncomment and adapt the following: | 
| 
webmaster@1
 | 
    84   # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] | 
| 
webmaster@1
 | 
    85   # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] | 
| 
webmaster@1
 | 
    86  | 
| 
webmaster@1
 | 
    87   # Modify the RewriteBase if you are using Drupal in a subdirectory or in a | 
| 
webmaster@1
 | 
    88   # VirtualDocumentRoot and the rewrite rules are not working properly. | 
| 
webmaster@1
 | 
    89   # For example if your site is at http://example.com/drupal uncomment and | 
| 
webmaster@1
 | 
    90   # modify the following line: | 
| 
webmaster@1
 | 
    91   # RewriteBase /drupal | 
| 
webmaster@1
 | 
    92   # | 
| 
webmaster@1
 | 
    93   # If your site is running in a VirtualDocumentRoot at http://example.com/, | 
| 
webmaster@1
 | 
    94   # uncomment the following line: | 
| 
webmaster@1
 | 
    95   # RewriteBase / | 
| 
webmaster@1
 | 
    96  | 
| 
webmaster@1
 | 
    97   # Rewrite URLs of the form 'index.php?q=x'. | 
| 
webmaster@1
 | 
    98   RewriteCond %{REQUEST_FILENAME} !-f | 
| 
webmaster@1
 | 
    99   RewriteCond %{REQUEST_FILENAME} !-d | 
| 
webmaster@1
 | 
   100   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] | 
| 
webmaster@1
 | 
   101 </IfModule> | 
| 
webmaster@1
 | 
   102  | 
| 
webmaster@1
 | 
   103 # $Id: .htaccess,v 1.90 2007/10/05 14:43:23 dries Exp $ |