Imported drupal-5.5
[drupal.git] / .htaccess
blobda632060e777513c906624f52e0b9976addc7235
2 # Apache/PHP/Drupal settings:
5 # Protect files and directories from prying eyes.
6 <FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
7   Order allow,deny
8 </FilesMatch>
10 # Don't show directory listings for URLs which map to a directory.
11 Options -Indexes
13 # Follow symbolic links in this directory.
14 Options +FollowSymLinks
16 # Customized error messages.
17 ErrorDocument 404 /index.php
19 # Set the default handler.
20 DirectoryIndex index.php
22 # Override PHP settings. More in sites/default/settings.php
23 # but the following cannot be changed at runtime.
25 # PHP 4, Apache 1.
26 <IfModule mod_php4.c>
27   php_value magic_quotes_gpc                0
28   php_value register_globals                0
29   php_value session.auto_start              0
30   php_value mbstring.http_input             pass
31   php_value mbstring.http_output            pass
32   php_value mbstring.encoding_translation   0
33 </IfModule>
35 # PHP 4, Apache 2.
36 <IfModule sapi_apache2.c>
37   php_value magic_quotes_gpc                0
38   php_value register_globals                0
39   php_value session.auto_start              0
40   php_value mbstring.http_input             pass
41   php_value mbstring.http_output            pass
42   php_value mbstring.encoding_translation   0
43 </IfModule>
45 # PHP 5, Apache 1 and 2.
46 <IfModule mod_php5.c>
47   php_value magic_quotes_gpc                0
48   php_value register_globals                0
49   php_value session.auto_start              0
50   php_value mbstring.http_input             pass
51   php_value mbstring.http_output            pass
52   php_value mbstring.encoding_translation   0
53 </IfModule>
55 # Requires mod_expires to be enabled.
56 <IfModule mod_expires.c>
57   # Enable expirations.
58   ExpiresActive On
59   # Cache all files for 2 weeks after access (A).
60   ExpiresDefault A1209600
61   # Do not cache dynamically generated pages.
62   ExpiresByType text/html A1
63 </IfModule>
65 # Various rewrite rules.
66 <IfModule mod_rewrite.c>
67   RewriteEngine on
69   # If your site can be accessed both with and without the 'www.' prefix, you
70   # can use one of the following settings to redirect users to your preferred
71   # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
72   #
73   # To redirect all users to access the site WITH the 'www.' prefix,
74   # (http://example.com/... will be redirected to http://www.example.com/...)
75   # adapt and uncomment the following:
76   # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
77   # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
78   #
79   # To redirect all users to access the site WITHOUT the 'www.' prefix,
80   # (http://www.example.com/... will be redirected to http://example.com/...)
81   # adapt and uncomment the following:
82   # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
83   # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
85   # Modify the RewriteBase if you are using Drupal in a subdirectory and
86   # the rewrite rules are not working properly.
87   #RewriteBase /drupal
89   # Rewrite old-style URLs of the form 'node.php?id=x'.
90   #RewriteCond %{REQUEST_FILENAME} !-f
91   #RewriteCond %{REQUEST_FILENAME} !-d
92   #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
93   #RewriteRule node.php index.php?q=node/view/%1 [L]
95   # Rewrite old-style URLs of the form 'module.php?mod=x'.
96   #RewriteCond %{REQUEST_FILENAME} !-f
97   #RewriteCond %{REQUEST_FILENAME} !-d
98   #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
99   #RewriteRule module.php index.php?q=%1 [L]
101   # Rewrite current-style URLs of the form 'index.php?q=x'.
102   RewriteCond %{REQUEST_FILENAME} !-f
103   RewriteCond %{REQUEST_FILENAME} !-d
104   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
105 </IfModule>
107 # $Id: .htaccess,v 1.81.2.3 2007/09/21 12:24:22 drumm Exp $