2 # Apache/PHP/Drupal settings:
5 <Directory /var/www/html>
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)$">
15 Options +FollowSymLinks
17 # Customized error messages.
18 ErrorDocument 404 index.php
20 # Set the default handler.
21 DirectoryIndex index.php
23 # Override PHP settings. More in sites/default/settings.php
24 # but the following cannot be changed at runtime.
28 php_value magic_quotes_gpc 0
29 php_value register_globals 0
30 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 # PHP 5, Apache 1 and 2
42 php_value magic_quotes_gpc 0
43 php_value register_globals 0
44 php_value session.auto_start 0
47 # Reduce the time dynamically generated pages are cache-able.
48 <IfModule mod_expires.c>
49 ExpiresByType text/html A1
52 # Various rewrite rules.
53 <IfModule mod_rewrite.c>
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:
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]
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]
68 # Modify the RewriteBase if you are using Drupal in a subdirectory and
69 # the rewrite rules are not working properly.
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]
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]
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]