]>
Commit | Line | Data |
---|---|---|
ad7425e6 ER |
1 | # |
2 | # Apache/PHP/Drupal settings: | |
3 | # | |
4 | ||
dee1e9df ER |
5 | <IfModule mod_alias.c> |
6 | Alias /drupal /usr/share/drupal/htdocs | |
7 | </IfModule> | |
8 | ||
9 | <Directory /usr/share/drupal/htdocs> | |
10 | Options None | |
11 | AllowOverride None | |
12 | <IfModule mod_access.c> | |
13 | order allow,deny | |
14 | allow from all | |
15 | </IfModule> | |
16 | <IfModule mod_php4.c> | |
17 | php_value include_path "/usr/share/drupal:/usr/share/pear:." | |
18 | </IfModule> | |
19 | </Directory> | |
20 | ||
ad7425e6 ER |
21 | # Protect files and directories from prying eyes. |
22 | <Files ~ "(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$"> | |
23 | Order deny,allow | |
24 | Deny from all | |
25 | </Files> | |
26 | ||
27 | # Set some options. | |
28 | Options -Indexes | |
29 | Options +FollowSymLinks | |
30 | ||
31 | # Customized error messages. | |
32 | ErrorDocument 404 /index.php | |
33 | ||
34 | # Set the default handler. | |
35 | DirectoryIndex index.php | |
36 | ||
37 | # Override PHP settings. More exist in sites/default/settings.php, but | |
38 | # the following cannot be changed at runtime. The first IfModule is | |
39 | # for Apache 1.3, the second for Apache 2. | |
40 | <IfModule mod_php4.c> | |
41 | php_value magic_quotes_gpc 0 | |
42 | php_value register_globals 0 | |
43 | php_value session.auto_start 0 | |
44 | </IfModule> | |
45 | ||
46 | <IfModule sapi_apache2.c> | |
47 | php_value magic_quotes_gpc 0 | |
48 | php_value register_globals 0 | |
49 | php_value session.auto_start 0 | |
50 | </IfModule> | |
51 | ||
52 | # Reduce the time dynamically generated pages are cache-able. | |
53 | <IfModule mod_expires.c> | |
54 | ExpiresByType text/html A1 | |
55 | </IfModule> | |
56 | ||
57 | # Various rewrite rules. | |
58 | <IfModule mod_rewrite.c> | |
59 | RewriteEngine on | |
60 | ||
61 | # Modify the RewriteBase if you are using Drupal in a subdirectory and | |
62 | # the rewrite rules are not working properly. | |
63 | #RewriteBase /drupal | |
64 | ||
65 | # Rewrite old-style URLs of the form 'node.php?id=x'. | |
66 | #RewriteCond %{REQUEST_FILENAME} !-f | |
67 | #RewriteCond %{REQUEST_FILENAME} !-d | |
68 | #RewriteCond %{QUERY_STRING} ^id=([^&]+)$ | |
69 | #RewriteRule node.php index.php?q=node/view/%1 [L] | |
70 | ||
71 | # Rewrite old-style URLs of the form 'module.php?mod=x'. | |
72 | #RewriteCond %{REQUEST_FILENAME} !-f | |
73 | #RewriteCond %{REQUEST_FILENAME} !-d | |
74 | #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$ | |
75 | #RewriteRule module.php index.php?q=%1 [L] | |
76 | ||
77 | # Rewrite current-style URLs of the form 'index.php?q=x'. | |
78 | RewriteCond %{REQUEST_FILENAME} !-f | |
79 | RewriteCond %{REQUEST_FILENAME} !-d | |
80 | RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] | |
81 | </IfModule> | |
82 | ||
83 | # $Id$ | |
84 | ||
dee1e9df | 85 | # vim: filetype=apache ts=4 sw=4 et |