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.
|
2006-10-17 08:36:19 +00:00
|
|
|
<FilesMatch "(\.(engine|inc|info|install|module|profile|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$">
|
2005-03-12 10:42:48 +00:00
|
|
|
Order deny,allow
|
|
|
|
Deny from all
|
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
|
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
|
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
|
2005-03-12 10:42:48 +00:00
|
|
|
</IfModule>
|
|
|
|
|
- More improvements by Morbus, Goba, TDobes et al:
Per TDobes' comments:
* INSTALL.txt corrected to use 4.3.3, not 4.33.
* .htaccess: removed allow_call_time_pass_reference. two confirmations that a) the setting was wrong in the first place, b) there were no adverse affects for the incorrect setting, c) the PHP docs say it is deprecated.
* .htaccess: removed short_open_tag. Running grep -r "<? " * across the entire directory tree of both core and contributions only brought up contributions and no core. I agree that the fuller form is better. The following contributions will need to be updated: modules/edit_template/edit_template.module, sandbox/garym/themes/marvin_2k/templates/page.tpl.php, sandbox/killes/compare.php, sandbox/paolino/import/click.php, themes/spreadfirefox/block.tpl.php. For error's sake, I also did a manual verification for "<?" (no space) across core and came up against nothing in addition to the above contribs.
Per Goba's comments:
* .htaccess: Moved session.auto_start back.
* sites/default/settings.php: Removed track_vars.
Per mailing list comments:
* INSTALL.txt: Added text about the files/ directory, creating it, and permissions.
* INSTALL.txt: Added an example of why Drupal requires cron (the search.module) in an attempt to justify why a crontab is a good, nay, required step.
And my own further analities:
* .htaccess: cleaned up some whitespace valleys (i hate 'em, hate 'em!) and fixed a few stray colons.
* settings.php: minor whitespace error.
2005-03-15 21:07:49 +00:00
|
|
|
# Reduce the time dynamically generated pages are cache-able.
|
2005-02-21 04:01:24 +00:00
|
|
|
<IfModule mod_expires.c>
|
|
|
|
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
|
|
|
|
2006-05-01 08:32:56 +00:00
|
|
|
# If your site can be accessed both with and without the prefix www. you
|
|
|
|
# can use one of the following settings to force user to use only one option:
|
2006-04-12 08:42:47 +00:00
|
|
|
#
|
2006-05-01 08:32:56 +00:00
|
|
|
# If you want the site to be accessed WITH the www. only, adapt and
|
|
|
|
# uncomment the following:
|
2006-09-01 07:25:25 +00:00
|
|
|
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
|
2006-04-12 08:42:47 +00:00
|
|
|
# RewriteRule .* http://www.example.com/ [L,R=301]
|
|
|
|
#
|
2006-05-01 08:32:56 +00:00
|
|
|
# If you want the site to be accessed only WITHOUT the www. prefix, adapt
|
|
|
|
# and uncomment the following:
|
2006-09-01 07:25:25 +00:00
|
|
|
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
|
2006-04-12 08:42:47 +00:00
|
|
|
# RewriteRule .* http://example.com/ [L,R=301]
|
|
|
|
|
- More improvements by Morbus, Goba, TDobes et al:
Per TDobes' comments:
* INSTALL.txt corrected to use 4.3.3, not 4.33.
* .htaccess: removed allow_call_time_pass_reference. two confirmations that a) the setting was wrong in the first place, b) there were no adverse affects for the incorrect setting, c) the PHP docs say it is deprecated.
* .htaccess: removed short_open_tag. Running grep -r "<? " * across the entire directory tree of both core and contributions only brought up contributions and no core. I agree that the fuller form is better. The following contributions will need to be updated: modules/edit_template/edit_template.module, sandbox/garym/themes/marvin_2k/templates/page.tpl.php, sandbox/killes/compare.php, sandbox/paolino/import/click.php, themes/spreadfirefox/block.tpl.php. For error's sake, I also did a manual verification for "<?" (no space) across core and came up against nothing in addition to the above contribs.
Per Goba's comments:
* .htaccess: Moved session.auto_start back.
* sites/default/settings.php: Removed track_vars.
Per mailing list comments:
* INSTALL.txt: Added text about the files/ directory, creating it, and permissions.
* INSTALL.txt: Added an example of why Drupal requires cron (the search.module) in an attempt to justify why a crontab is a good, nay, required step.
And my own further analities:
* .htaccess: cleaned up some whitespace valleys (i hate 'em, hate 'em!) and fixed a few stray colons.
* settings.php: minor whitespace error.
2005-03-15 21:07:49 +00:00
|
|
|
# Modify the RewriteBase if you are using Drupal in a subdirectory and
|
2005-03-12 10:42:48 +00:00
|
|
|
# the rewrite rules are not working properly.
|
2003-09-18 20:32:23 +00:00
|
|
|
#RewriteBase /drupal
|
|
|
|
|
2005-03-20 19:15:00 +00:00
|
|
|
# Rewrite old-style URLs of the form 'node.php?id=x'.
|
2003-03-11 12:57:13 +00:00
|
|
|
#RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
#RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
|
|
|
|
#RewriteRule node.php index.php?q=node/view/%1 [L]
|
2003-05-13 18:36:38 +00:00
|
|
|
|
- More improvements by Morbus, Goba, TDobes et al:
Per TDobes' comments:
* INSTALL.txt corrected to use 4.3.3, not 4.33.
* .htaccess: removed allow_call_time_pass_reference. two confirmations that a) the setting was wrong in the first place, b) there were no adverse affects for the incorrect setting, c) the PHP docs say it is deprecated.
* .htaccess: removed short_open_tag. Running grep -r "<? " * across the entire directory tree of both core and contributions only brought up contributions and no core. I agree that the fuller form is better. The following contributions will need to be updated: modules/edit_template/edit_template.module, sandbox/garym/themes/marvin_2k/templates/page.tpl.php, sandbox/killes/compare.php, sandbox/paolino/import/click.php, themes/spreadfirefox/block.tpl.php. For error's sake, I also did a manual verification for "<?" (no space) across core and came up against nothing in addition to the above contribs.
Per Goba's comments:
* .htaccess: Moved session.auto_start back.
* sites/default/settings.php: Removed track_vars.
Per mailing list comments:
* INSTALL.txt: Added text about the files/ directory, creating it, and permissions.
* INSTALL.txt: Added an example of why Drupal requires cron (the search.module) in an attempt to justify why a crontab is a good, nay, required step.
And my own further analities:
* .htaccess: cleaned up some whitespace valleys (i hate 'em, hate 'em!) and fixed a few stray colons.
* settings.php: minor whitespace error.
2005-03-15 21:07:49 +00:00
|
|
|
# Rewrite old-style URLs of the form 'module.php?mod=x'.
|
2003-03-11 12:57:13 +00:00
|
|
|
#RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
#RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
|
|
|
|
#RewriteRule module.php index.php?q=%1 [L]
|
|
|
|
|
- More improvements by Morbus, Goba, TDobes et al:
Per TDobes' comments:
* INSTALL.txt corrected to use 4.3.3, not 4.33.
* .htaccess: removed allow_call_time_pass_reference. two confirmations that a) the setting was wrong in the first place, b) there were no adverse affects for the incorrect setting, c) the PHP docs say it is deprecated.
* .htaccess: removed short_open_tag. Running grep -r "<? " * across the entire directory tree of both core and contributions only brought up contributions and no core. I agree that the fuller form is better. The following contributions will need to be updated: modules/edit_template/edit_template.module, sandbox/garym/themes/marvin_2k/templates/page.tpl.php, sandbox/killes/compare.php, sandbox/paolino/import/click.php, themes/spreadfirefox/block.tpl.php. For error's sake, I also did a manual verification for "<?" (no space) across core and came up against nothing in addition to the above contribs.
Per Goba's comments:
* .htaccess: Moved session.auto_start back.
* sites/default/settings.php: Removed track_vars.
Per mailing list comments:
* INSTALL.txt: Added text about the files/ directory, creating it, and permissions.
* INSTALL.txt: Added an example of why Drupal requires cron (the search.module) in an attempt to justify why a crontab is a good, nay, required step.
And my own further analities:
* .htaccess: cleaned up some whitespace valleys (i hate 'em, hate 'em!) and fixed a few stray colons.
* settings.php: minor whitespace error.
2005-03-15 21:07:49 +00:00
|
|
|
# Rewrite current-style 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$
|