2 # Apache/PHP/Drupal settings:
5 <Directory /usr/share/drupal/htdocs>
8 <IfModule mod_access.c>
13 php_value include_path "/usr/share/drupal:/etc/drupal:."
16 # Set the default handler.
18 DirectoryIndex index.php
21 # Override PHP settings. More exist in sites/default/settings.php, but
22 # the following cannot be changed at runtime. The first IfModule is
23 # for Apache 1.3, the second for Apache 2.
25 php_value magic_quotes_gpc 0
26 php_value register_globals 0
27 php_value session.auto_start 0
30 <IfModule sapi_apache2.c>
31 php_value magic_quotes_gpc 0
32 php_value register_globals 0
33 php_value session.auto_start 0
36 # Reduce the time dynamically generated pages are cache-able.
37 <IfModule mod_expires.c>
38 ExpiresByType text/html A1
41 # Various rewrite rules.
42 <IfModule mod_rewrite.c>
45 # Modify the RewriteBase if you are using Drupal in a subdirectory and
46 # the rewrite rules are not working properly.
47 # Comment it out if you have drupal configured in virtualhost root.
50 # Rewrite old-style URLs of the form 'node.php?id=x'.
51 #RewriteCond %{REQUEST_FILENAME} !-f
52 #RewriteCond %{REQUEST_FILENAME} !-d
53 #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
54 #RewriteRule node.php index.php?q=node/view/%1 [L]
56 # Rewrite old-style URLs of the form 'module.php?mod=x'.
57 #RewriteCond %{REQUEST_FILENAME} !-f
58 #RewriteCond %{REQUEST_FILENAME} !-d
59 #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
60 #RewriteRule module.php index.php?q=%1 [L]
62 # Rewrite current-style URLs of the form 'index.php?q=x'.
63 RewriteCond %{REQUEST_FILENAME} !-f
64 RewriteCond %{REQUEST_FILENAME} !-d
65 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
68 # Customized error messages.
69 ErrorDocument 404 /index.php
72 <IfModule mod_alias.c>
73 Alias /drupal /usr/share/drupal/htdocs
76 # Comment out this block if you have drupal configured in virtualhost root.
78 # Customized error messages.
79 ErrorDocument 404 /drupal/index.php
82 # use something like this for vhost setup, and remember to disable Alias
83 # /drupal and RewriteBase /drupal above.
84 # Please note that drupal-ID's don't work in subdirs, you need vhost for that.
87 # DocumentRoot /usr/share/drupal/htdocs
90 # vim: filetype=apache ts=4 sw=4 et