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.
|
2009-06-21 10:48:06 +00:00
|
|
|
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
|
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
|
|
|
|
2008-06-26 19:19:44 +00:00
|
|
|
# Make Drupal handle any 404 errors.
|
2003-12-18 18:53:11 +00:00
|
|
|
ErrorDocument 404 /index.php
|
|
|
|
|
2008-06-26 19:19:44 +00:00
|
|
|
# Force simple error message for requests for non-existent favicon.ico.
|
|
|
|
<Files favicon.ico>
|
2008-11-28 09:39:13 +00:00
|
|
|
# There is no end quote below, for compatibility with Apache 1.3.
|
2008-06-28 19:48:21 +00:00
|
|
|
ErrorDocument 404 "The requested file favicon.ico was not found.
|
2008-06-26 19:19:44 +00:00
|
|
|
</Files>
|
|
|
|
|
2005-03-12 10:42:48 +00:00
|
|
|
# Set the default handler.
|
2009-05-16 13:19:12 +00:00
|
|
|
DirectoryIndex index.php index.html index.htm
|
2001-11-24 13:18:58 +00:00
|
|
|
|
2008-11-22 13:46:11 +00:00
|
|
|
# Override PHP settings that cannot be changed at runtime. See
|
|
|
|
# sites/default/default.settings.php and drupal_initialize_variables() in
|
|
|
|
# includes/bootstrap.inc for settings that can be changed at runtime.
|
2006-02-08 20:42:29 +00:00
|
|
|
|
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>
|
2008-09-15 15:21:44 +00:00
|
|
|
php_flag magic_quotes_gpc off
|
2009-01-09 02:49:01 +00:00
|
|
|
php_flag magic_quotes_sybase off
|
2008-09-15 15:21:44 +00:00
|
|
|
php_flag register_globals off
|
|
|
|
php_flag session.auto_start off
|
2007-04-07 11:05:06 +00:00
|
|
|
php_value mbstring.http_input pass
|
|
|
|
php_value mbstring.http_output pass
|
2008-09-15 15:21:44 +00:00
|
|
|
php_flag mbstring.encoding_translation off
|
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
|
|
|
|
2009-08-16 12:10:36 +00:00
|
|
|
<FilesMatch \.php$>
|
|
|
|
# Do not allow PHP scripts to be cached unless they explicitly send cache
|
|
|
|
# headers themselves. Otherwise all scripts would have to overwrite the
|
|
|
|
# headers set by mod_expires if they want another caching behavior. This may
|
|
|
|
# fail if an error occurs early in the bootstrap process, and it may cause
|
|
|
|
# problems if a non-Drupal PHP file is installed in a subdirectory.
|
2009-04-22 09:45:03 +00:00
|
|
|
ExpiresActive Off
|
2009-08-16 12:10:36 +00:00
|
|
|
</FilesMatch>
|
2005-02-21 04:01:24 +00:00
|
|
|
</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/...)
|
2009-06-09 05:08:16 +00:00
|
|
|
# uncomment the following:
|
|
|
|
# RewriteCond %{HTTP_HOST} !^www\. [NC]
|
|
|
|
# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [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/...)
|
2009-06-09 05:08:16 +00:00
|
|
|
# uncomment the following:
|
|
|
|
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
|
|
|
# RewriteRule ^ http://%1%{REQUEST_URI} [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
|
|
|
|
2008-06-28 19:48:21 +00:00
|
|
|
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
|
2003-02-14 19:52:45 +00:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
2008-06-26 19:19:44 +00:00
|
|
|
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
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$
|