388546956e086a2403bf82765ab32e96821e80e5
[plewww.git] / planetlab.conf
1 #
2 # Apache/PHP/Drupal settings:
3 #
4
5 <Directory /var/www/html>
6
7 # Protect files and directories from prying eyes.
8 <FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$">
9   Order deny,allow
10   Deny from all
11 </FilesMatch>
12
13 # Set some options.
14 Options -Indexes
15 Options +FollowSymLinks
16
17 # Customized error messages.
18 ErrorDocument 404 index.php
19
20 # Set the default handler.
21 DirectoryIndex index.php
22
23 # Override PHP settings. More in sites/default/settings.php
24 # but the following cannot be changed at runtime.
25
26 # PHP 4, Apache 1
27 <IfModule mod_php4.c>
28   php_value magic_quotes_gpc                0
29   php_value register_globals                0
30   php_value session.auto_start              0
31 </IfModule>
32
33 # PHP 4, Apache 2
34 <IfModule sapi_apache2.c>
35   php_value magic_quotes_gpc                0
36   php_value register_globals                0
37   php_value session.auto_start              0
38 </IfModule>
39
40 # PHP 5, Apache 1 and 2
41 <IfModule mod_php5.c>
42   php_value magic_quotes_gpc                0
43   php_value register_globals                0
44   php_value session.auto_start              0
45 </IfModule>
46
47 # Reduce the time dynamically generated pages are cache-able.
48 <IfModule mod_expires.c>
49   ExpiresByType text/html A1
50 </IfModule>
51
52 # Various rewrite rules.
53 <IfModule mod_rewrite.c>
54   RewriteEngine on
55
56   # If your site can be accessed both with and without the prefix www.
57   # you can use one of the following settings to force user to use only one option:
58   #
59   # If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
60   # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
61   # RewriteRule .* http://www.example.com/ [L,R=301]
62   #
63   # If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
64   # RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
65   # RewriteRule .* http://example.com/ [L,R=301]
66
67
68   # Modify the RewriteBase if you are using Drupal in a subdirectory and
69   # the rewrite rules are not working properly.
70   # RewriteBase /drupal
71
72   # Rewrite old-style URLs of the form 'node.php?id=x'.
73   #RewriteCond %{REQUEST_FILENAME} !-f
74   #RewriteCond %{REQUEST_FILENAME} !-d
75   #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
76   #RewriteRule node.php index.php?q=node/view/%1 [L]
77
78   # Rewrite old-style URLs of the form 'module.php?mod=x'.
79   #RewriteCond %{REQUEST_FILENAME} !-f
80   #RewriteCond %{REQUEST_FILENAME} !-d
81   #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
82   #RewriteRule module.php index.php?q=%1 [L]
83
84   # Rewrite current-style URLs of the form 'index.php?q=x'.
85   RewriteCond %{REQUEST_FILENAME} !-f
86   RewriteCond %{REQUEST_FILENAME} !-d
87   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
88 </IfModule>
89
90 </Directory>
91
92 # $Id: drupal.conf 144 2007-03-28 07:52:20Z thierry $