Mercurial > defr > drupal > core
comparison .htaccess @ 1:c1f4ac30525a 6.0
Drupal 6.0
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:28:28 +0100 |
parents | |
children | fff6d4c8c043 |
comparison
equal
deleted
inserted
replaced
0:5a113a1c4740 | 1:c1f4ac30525a |
---|---|
1 # | |
2 # Apache/PHP/Drupal settings: | |
3 # | |
4 | |
5 # Protect files and directories from prying eyes. | |
6 <FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$"> | |
7 Order allow,deny | |
8 </FilesMatch> | |
9 | |
10 # Don't show directory listings for URLs which map to a directory. | |
11 Options -Indexes | |
12 | |
13 # Follow symbolic links in this directory. | |
14 Options +FollowSymLinks | |
15 | |
16 # Customized error messages. | |
17 ErrorDocument 404 /index.php | |
18 | |
19 # Set the default handler. | |
20 DirectoryIndex index.php | |
21 | |
22 # Override PHP settings. More in sites/default/settings.php | |
23 # but the following cannot be changed at runtime. | |
24 | |
25 # PHP 4, Apache 1. | |
26 <IfModule mod_php4.c> | |
27 php_value magic_quotes_gpc 0 | |
28 php_value register_globals 0 | |
29 php_value session.auto_start 0 | |
30 php_value mbstring.http_input pass | |
31 php_value mbstring.http_output pass | |
32 php_value mbstring.encoding_translation 0 | |
33 </IfModule> | |
34 | |
35 # PHP 4, Apache 2. | |
36 <IfModule sapi_apache2.c> | |
37 php_value magic_quotes_gpc 0 | |
38 php_value register_globals 0 | |
39 php_value session.auto_start 0 | |
40 php_value mbstring.http_input pass | |
41 php_value mbstring.http_output pass | |
42 php_value mbstring.encoding_translation 0 | |
43 </IfModule> | |
44 | |
45 # PHP 5, Apache 1 and 2. | |
46 <IfModule mod_php5.c> | |
47 php_value magic_quotes_gpc 0 | |
48 php_value register_globals 0 | |
49 php_value session.auto_start 0 | |
50 php_value mbstring.http_input pass | |
51 php_value mbstring.http_output pass | |
52 php_value mbstring.encoding_translation 0 | |
53 </IfModule> | |
54 | |
55 # Requires mod_expires to be enabled. | |
56 <IfModule mod_expires.c> | |
57 # Enable expirations. | |
58 ExpiresActive On | |
59 | |
60 # Cache all files for 2 weeks after access (A). | |
61 ExpiresDefault A1209600 | |
62 | |
63 # Do not cache dynamically generated pages. | |
64 ExpiresByType text/html A1 | |
65 </IfModule> | |
66 | |
67 # Various rewrite rules. | |
68 <IfModule mod_rewrite.c> | |
69 RewriteEngine on | |
70 | |
71 # If your site can be accessed both with and without the 'www.' prefix, you | |
72 # can use one of the following settings to redirect users to your preferred | |
73 # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: | |
74 # | |
75 # To redirect all users to access the site WITH the 'www.' prefix, | |
76 # (http://example.com/... will be redirected to http://www.example.com/...) | |
77 # adapt and uncomment the following: | |
78 # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] | |
79 # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] | |
80 # | |
81 # To redirect all users to access the site WITHOUT the 'www.' prefix, | |
82 # (http://www.example.com/... will be redirected to http://example.com/...) | |
83 # uncomment and adapt the following: | |
84 # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] | |
85 # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] | |
86 | |
87 # Modify the RewriteBase if you are using Drupal in a subdirectory or in a | |
88 # VirtualDocumentRoot and the rewrite rules are not working properly. | |
89 # For example if your site is at http://example.com/drupal uncomment and | |
90 # modify the following line: | |
91 # RewriteBase /drupal | |
92 # | |
93 # If your site is running in a VirtualDocumentRoot at http://example.com/, | |
94 # uncomment the following line: | |
95 # RewriteBase / | |
96 | |
97 # Rewrite URLs of the form 'index.php?q=x'. | |
98 RewriteCond %{REQUEST_FILENAME} !-f | |
99 RewriteCond %{REQUEST_FILENAME} !-d | |
100 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] | |
101 </IfModule> | |
102 | |
103 # $Id: .htaccess,v 1.90 2007/10/05 14:43:23 dries Exp $ |