2 # Apache/PHP/Drupal settings.
4 # Default setup is for running drupal in vhost.
5 # You can setup drupal as alias /drupal, but you need to comment/uncomment few things.
7 # Please note that drupal-ID's don't work in subdirs, you need vhost for that.
9 <Directory /usr/share/drupal/htdocs>
10 Options FollowSymLinks
12 <IfModule mod_access.c>
17 php_value include_path "/usr/share/drupal:/etc/drupal:."
20 # Set the default handler.
22 DirectoryIndex index.php
25 # Override PHP settings. More exist in sites/default/settings.php, but
26 # the following cannot be changed at runtime. The first IfModule is
27 # for Apache 1.3, the second for Apache 2.
29 php_value magic_quotes_gpc 0
30 php_value register_globals 0
31 php_value session.auto_start 0
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
40 # Reduce the time dynamically generated pages are cache-able.
41 <IfModule mod_expires.c>
42 ExpiresByType text/html A1
45 # Various rewrite rules.
46 <IfModule mod_rewrite.c>
49 # Modify the RewriteBase if you are using Drupal in a subdirectory and
50 # the rewrite rules are not working properly.
51 # Enable RewriteBase if you have drupal configured in virtualhost root.
54 # Rewrite old-style URLs of the form 'node.php?id=x'.
55 #RewriteCond %{REQUEST_FILENAME} !-f
56 #RewriteCond %{REQUEST_FILENAME} !-d
57 #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
58 #RewriteRule node.php index.php?q=node/view/%1 [L]
60 # Rewrite old-style URLs of the form 'module.php?mod=x'.
61 #RewriteCond %{REQUEST_FILENAME} !-f
62 #RewriteCond %{REQUEST_FILENAME} !-d
63 #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
64 #RewriteRule module.php index.php?q=%1 [L]
66 # Rewrite current-style URLs of the form 'index.php?q=x'.
67 RewriteCond %{REQUEST_FILENAME} !-f
68 RewriteCond %{REQUEST_FILENAME} !-d
69 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
72 # Customized error messages.
73 ErrorDocument 404 /index.php
76 # If having drupal installed as /drupal
77 #<IfModule mod_alias.c>
78 # Alias /drupal/files /var/lib/drupal
79 # Alias /drupal /usr/share/drupal/htdocs
83 # # Customized error messages.
84 # ErrorDocument 404 /drupal/index.php
89 ServerAlias www.drupal
90 DocumentRoot /usr/share/drupal/htdocs
92 <IfModule mod_alias.c>
93 Alias /files /var/lib/drupal
97 # vim: filetype=apache ts=4 sw=4 et