| 1 |
#
|
| 2 |
# Apache/PHP/Drupal settings:
|
| 3 |
#
|
| 4 |
|
| 5 |
# Protect files and directories from prying eyes.
|
| 6 |
<FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$">
|
| 7 |
Order deny,allow
|
| 8 |
Deny from all
|
| 9 |
</FilesMatch>
|
| 10 |
|
| 11 |
# Set some options.
|
| 12 |
Options -Indexes
|
| 13 |
Options +FollowSymLinks
|
| 14 |
|
| 15 |
# Customized error messages.
|
| 16 |
ErrorDocument 404 /index.php
|
| 17 |
|
| 18 |
# Set the default handler.
|
| 19 |
DirectoryIndex index.php
|
| 20 |
|
| 21 |
# Override PHP settings. More in sites/default/settings.php
|
| 22 |
# but the following cannot be changed at runtime.
|
| 23 |
|
| 24 |
# PHP 4, Apache 1
|
| 25 |
<IfModule mod_php4.c>
|
| 26 |
php_value magic_quotes_gpc 0
|
| 27 |
php_value register_globals 0
|
| 28 |
php_value session.auto_start 0
|
| 29 |
</IfModule>
|
| 30 |
|
| 31 |
# PHP 4, Apache 2
|
| 32 |
<IfModule sapi_apache2.c>
|
| 33 |
php_value magic_quotes_gpc 0
|
| 34 |
php_value register_globals 0
|
| 35 |
php_value session.auto_start 0
|
| 36 |
</IfModule>
|
| 37 |
|
| 38 |
# PHP 5, Apache 1 and 2
|
| 39 |
<IfModule mod_php5.c>
|
| 40 |
php_value magic_quotes_gpc 0
|
| 41 |
php_value register_globals 0
|
| 42 |
php_value session.auto_start 0
|
| 43 |
</IfModule>
|
| 44 |
|
| 45 |
# Reduce the time dynamically generated pages are cache-able.
|
| 46 |
<IfModule mod_expires.c>
|
| 47 |
ExpiresByType text/html A1
|
| 48 |
</IfModule>
|
| 49 |
|
| 50 |
# Various rewrite rules.
|
| 51 |
<IfModule mod_rewrite.c>
|
| 52 |
RewriteEngine on
|
| 53 |
|
| 54 |
# If your site can be accessed both with and without the prefix www.
|
| 55 |
# you can use one of the following settings to force user to use only one option:
|
| 56 |
#
|
| 57 |
# If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
|
| 58 |
# RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
|
| 59 |
# RewriteRule .* http://www.example.com/ [L,R=301]
|
| 60 |
#
|
| 61 |
# If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
|
| 62 |
# RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
|
| 63 |
# RewriteRule .* http://example.com/ [L,R=301]
|
| 64 |
|
| 65 |
|
| 66 |
# Modify the RewriteBase if you are using Drupal in a subdirectory and
|
| 67 |
# the rewrite rules are not working properly.
|
| 68 |
#RewriteBase /drupal
|
| 69 |
|
| 70 |
# Rewrite old-style URLs of the form 'node.php?id=x'.
|
| 71 |
#RewriteCond %{REQUEST_FILENAME} !-f
|
| 72 |
#RewriteCond %{REQUEST_FILENAME} !-d
|
| 73 |
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
|
| 74 |
#RewriteRule node.php index.php?q=node/view/%1 [L]
|
| 75 |
|
| 76 |
# Rewrite old-style URLs of the form 'module.php?mod=x'.
|
| 77 |
#RewriteCond %{REQUEST_FILENAME} !-f
|
| 78 |
#RewriteCond %{REQUEST_FILENAME} !-d
|
| 79 |
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
|
| 80 |
#RewriteRule module.php index.php?q=%1 [L]
|
| 81 |
|
| 82 |
# Rewrite current-style URLs of the form 'index.php?q=x'.
|
| 83 |
RewriteCond %{REQUEST_FILENAME} !-f
|
| 84 |
RewriteCond %{REQUEST_FILENAME} !-d
|
| 85 |
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
|
| 86 |
</IfModule>
|
| 87 |
|
| 88 |
# $Id: .htaccess,v 1.73 2006/04/14 09:08:26 killes Exp $
|