#668386 by yched: Handle unavailable entity types or bundles.
[project/drupal.git] / .htaccess
CommitLineData
9bd920de 1#
2eec4e80 2# Apache/PHP/Drupal settings:
9bd920de
DB
3#
4
2eec4e80 5# Protect files and directories from prying eyes.
cc4e4158 6<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
94fbfe8b 7 Order allow,deny
316e3578 8</FilesMatch>
c1a88d5d 9
1b1ceb6e 10# Don't show directory listings for URLs which map to a directory.
cd401235 11Options -Indexes
1b1ceb6e
ND
12
13# Follow symbolic links in this directory.
63c2d329 14Options +FollowSymLinks
594aff05 15
34fd475f 16# Make Drupal handle any 404 errors.
033b2e2c
DB
17ErrorDocument 404 /index.php
18
34fd475f
DB
19# Force simple error message for requests for non-existent favicon.ico.
20<Files favicon.ico>
9b391c2e 21 # There is no end quote below, for compatibility with Apache 1.3.
6fca076e 22 ErrorDocument 404 "The requested file favicon.ico was not found.
34fd475f
DB
23</Files>
24
2eec4e80 25# Set the default handler.
2a562943 26DirectoryIndex index.php index.html index.htm
cd401235 27
6608f70c
DB
28# Override PHP settings that cannot be changed at runtime. See
29# sites/default/default.settings.php and drupal_initialize_variables() in
30# includes/bootstrap.inc for settings that can be changed at runtime.
b4933bcd 31
1b1ceb6e 32# PHP 5, Apache 1 and 2.
b4933bcd 33<IfModule mod_php5.c>
4ebaf8b6 34 php_flag magic_quotes_gpc off
d046c0c2 35 php_flag magic_quotes_sybase off
4ebaf8b6
DB
36 php_flag register_globals off
37 php_flag session.auto_start off
6f94dc3c
SW
38 php_value mbstring.http_input pass
39 php_value mbstring.http_output pass
4ebaf8b6 40 php_flag mbstring.encoding_translation off
2eec4e80
DB
41</IfModule>
42
50535ab3 43# Requires mod_expires to be enabled.
59e86f61 44<IfModule mod_expires.c>
50535ab3
DB
45 # Enable expirations.
46 ExpiresActive On
a6674e22 47
50535ab3
DB
48 # Cache all files for 2 weeks after access (A).
49 ExpiresDefault A1209600
a6674e22 50
3df77d6b
DB
51 <FilesMatch \.php$>
52 # Do not allow PHP scripts to be cached unless they explicitly send cache
53 # headers themselves. Otherwise all scripts would have to overwrite the
54 # headers set by mod_expires if they want another caching behavior. This may
55 # fail if an error occurs early in the bootstrap process, and it may cause
56 # problems if a non-Drupal PHP file is installed in a subdirectory.
526401c4 57 ExpiresActive Off
3df77d6b 58 </FilesMatch>
59e86f61
SW
59</IfModule>
60
2eec4e80 61# Various rewrite rules.
01a8b5ed 62<IfModule mod_rewrite.c>
63 RewriteEngine on
07bb6786 64
cc62bb26
DB
65 # If your site can be accessed both with and without the 'www.' prefix, you
66 # can use one of the following settings to redirect users to your preferred
67 # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
69726b0d 68 #
cc62bb26
DB
69 # To redirect all users to access the site WITH the 'www.' prefix,
70 # (http://example.com/... will be redirected to http://www.example.com/...)
8f2c63ea
DB
71 # uncomment the following:
72 # RewriteCond %{HTTP_HOST} !^www\. [NC]
73 # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
69726b0d 74 #
0b42d1dc 75 # To redirect all users to access the site WITHOUT the 'www.' prefix,
cc62bb26 76 # (http://www.example.com/... will be redirected to http://example.com/...)
8f2c63ea
DB
77 # uncomment the following:
78 # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
79 # RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
69726b0d 80
a6674e22
H
81 # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
82 # VirtualDocumentRoot and the rewrite rules are not working properly.
83 # For example if your site is at http://example.com/drupal uncomment and
84 # modify the following line:
85 # RewriteBase /drupal
86 #
c389c905 87 # If your site is running in a VirtualDocumentRoot at http://example.com/,
a6674e22
H
88 # uncomment the following line:
89 # RewriteBase /
e4695fd5 90
1df3cfff
DB
91 # Pass all requests not referring directly to files in the filesystem to
92 # index.php. Clean URLs are handled in drupal_environment_initialize().
d0387297
DB
93 RewriteCond %{REQUEST_FILENAME} !-f
94 RewriteCond %{REQUEST_FILENAME} !-d
34fd475f 95 RewriteCond %{REQUEST_URI} !=/favicon.ico
1df3cfff 96 RewriteRule ^ index.php [L]
cd401235 97</IfModule>
98
99# $Id$