2000-05-28 09:23:56 +00:00
|
|
|
#
|
2005-03-12 10:42:48 +00:00
|
|
|
# Apache/PHP/Drupal settings:
|
2000-05-28 09:23:56 +00:00
|
|
|
#
|
|
|
|
|
2005-03-12 10:42:48 +00:00
|
|
|
# Protect files and directories from prying eyes.
|
2007-10-05 14:43:26 +00:00
|
|
|
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
|
2006-11-29 06:16:14 +00:00
|
|
|
Order allow,deny
|
2005-12-01 16:02:09 +00:00
|
|
|
</FilesMatch>
|
2000-12-16 08:39:01 +00:00
|
|
|
|
2006-05-01 08:32:56 +00:00
|
|
|
# Don't show directory listings for URLs which map to a directory.
|
2001-11-24 13:18:58 +00:00
|
|
|
Options -Indexes
|
2006-05-01 08:32:56 +00:00
|
|
|
|
|
|
|
# Follow symbolic links in this directory.
|
2004-10-09 20:41:49 +00:00
|
|
|
Options +FollowSymLinks
|
2003-06-26 04:54:01 +00:00
|
|
|
|
2005-03-12 10:42:48 +00:00
|
|
|
# Customized error messages.
|
2003-12-18 18:53:11 +00:00
|
|
|
ErrorDocument 404 /index.php
|
|
|
|
|
2005-03-12 10:42:48 +00:00
|
|
|
# Set the default handler.
|
2005-02-20 11:24:30 +00:00
|
|
|
DirectoryIndex index.php
|
2001-11-24 13:18:58 +00:00
|
|
|
|
2006-02-08 20:42:29 +00:00
|
|
|
# Override PHP settings. More in sites/default/settings.php
|
|
|
|
# but the following cannot be changed at runtime.
|
|
|
|
|
2006-05-01 08:32:56 +00:00
|
|
|
# PHP 4, Apache 1.
|
2005-01-28 16:30:37 +00:00
|
|
|
<IfModule mod_php4.c>
|
2005-03-20 19:15:00 +00:00
|
|
|
php_value magic_quotes_gpc 0
|
|
|
|
php_value register_globals 0
|
|
|
|
php_value session.auto_start 0
|
2007-04-07 11:05:06 +00:00
|
|
|
php_value mbstring.http_input pass
|
|
|
|
php_value mbstring.http_output pass
|
|
|
|
php_value mbstring.encoding_translation 0
|
2000-06-22 09:14:16 +00:00
|
|
|
</IfModule>
|
2001-07-14 14:28:32 +00:00
|
|
|
|
2006-05-01 08:32:56 +00:00
|
|
|
# PHP 4, Apache 2.
|
2005-03-12 10:42:48 +00:00
|
|
|
<IfModule sapi_apache2.c>
|
2005-03-20 19:15:00 +00:00
|
|
|
php_value magic_quotes_gpc 0
|
|
|
|
php_value register_globals 0
|
|
|
|
php_value session.auto_start 0
|
2007-04-07 11:05:06 +00:00
|
|
|
php_value mbstring.http_input pass
|
|
|
|
php_value mbstring.http_output pass
|
|
|
|
php_value mbstring.encoding_translation 0
|
2006-02-08 20:42:29 +00:00
|
|
|
</IfModule>
|
|
|
|
|
2006-05-01 08:32:56 +00:00
|
|
|
# PHP 5, Apache 1 and 2.
|
2006-02-08 20:42:29 +00:00
|
|
|
<IfModule mod_php5.c>
|
|
|
|
php_value magic_quotes_gpc 0
|
|
|
|
php_value register_globals 0
|
|
|
|
php_value session.auto_start 0
|
2007-04-07 11:05:06 +00:00
|
|
|
php_value mbstring.http_input pass
|
|
|
|
php_value mbstring.http_output pass
|
|
|
|
php_value mbstring.encoding_translation 0
|
2005-03-12 10:42:48 +00:00
|
|
|
</IfModule>
|
|
|
|
|
2007-01-09 09:27:10 +00:00
|
|
|
# Requires mod_expires to be enabled.
|
2005-02-21 04:01:24 +00:00
|
|
|
<IfModule mod_expires.c>
|
2007-01-09 09:27:10 +00:00
|
|
|
# Enable expirations.
|
|
|
|
ExpiresActive On
|
2007-09-07 12:26:59 +00:00
|
|
|
|
2007-01-09 09:27:10 +00:00
|
|
|
# Cache all files for 2 weeks after access (A).
|
|
|
|
ExpiresDefault A1209600
|
2007-09-07 12:26:59 +00:00
|
|
|
|
2007-01-09 09:27:10 +00:00
|
|
|
# Do not cache dynamically generated pages.
|
2005-02-21 04:01:24 +00:00
|
|
|
ExpiresByType text/html A1
|
|
|
|
</IfModule>
|
|
|
|
|
2005-03-12 10:42:48 +00:00
|
|
|
# Various rewrite rules.
|
2001-07-14 14:28:32 +00:00
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
RewriteEngine on
|
2003-03-11 12:57:13 +00:00
|
|
|
|
2007-05-18 17:44:29 +00:00
|
|
|
# If your site can be accessed both with and without the 'www.' prefix, you
|
|
|
|
# can use one of the following settings to redirect users to your preferred
|
|
|
|
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
|
2006-04-12 08:42:47 +00:00
|
|
|
#
|
2007-05-18 17:44:29 +00:00
|
|
|
# To redirect all users to access the site WITH the 'www.' prefix,
|
|
|
|
# (http://example.com/... will be redirected to http://www.example.com/...)
|
|
|
|
# adapt and uncomment the following:
|
2006-09-01 07:25:25 +00:00
|
|
|
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
|
2007-05-18 17:44:29 +00:00
|
|
|
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
|
2006-04-12 08:42:47 +00:00
|
|
|
#
|
2007-05-18 22:09:45 +00:00
|
|
|
# To redirect all users to access the site WITHOUT the 'www.' prefix,
|
2007-05-18 17:44:29 +00:00
|
|
|
# (http://www.example.com/... will be redirected to http://example.com/...)
|
2007-09-07 12:26:59 +00:00
|
|
|
# uncomment and adapt the following:
|
2006-09-01 07:25:25 +00:00
|
|
|
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
|
2007-05-18 17:44:29 +00:00
|
|
|
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
|
2006-04-12 08:42:47 +00:00
|
|
|
|
2007-09-07 12:26:59 +00:00
|
|
|
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
|
|
|
|
# VirtualDocumentRoot and the rewrite rules are not working properly.
|
|
|
|
# For example if your site is at http://example.com/drupal uncomment and
|
|
|
|
# modify the following line:
|
|
|
|
# RewriteBase /drupal
|
|
|
|
#
|
2007-10-02 16:03:17 +00:00
|
|
|
# If your site is running in a VirtualDocumentRoot at http://example.com/,
|
2007-09-07 12:26:59 +00:00
|
|
|
# uncomment the following line:
|
|
|
|
# RewriteBase /
|
2003-09-18 20:32:23 +00:00
|
|
|
|
2007-01-29 12:36:51 +00:00
|
|
|
# Rewrite URLs of the form 'index.php?q=x'.
|
2003-02-14 19:52:45 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
2003-05-13 18:36:38 +00:00
|
|
|
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
|
2001-11-24 13:18:58 +00:00
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
# $Id$
|