author | cavaliet@caf4f556-3d62-0410-8435-a86758001935 |
Fri, 21 Aug 2009 16:26:26 +0000 | |
branch | drupal |
changeset 74 | 0ff3ba646492 |
parent 5 | e6218e56f418 |
permissions | -rw-r--r-- |
74
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
1 |
# |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
2 |
# Apache/PHP/Drupal settings: |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
3 |
# |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
4 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
5 |
# Protect files and directories from prying eyes. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
6 |
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$"> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
7 |
Order allow,deny |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
8 |
</FilesMatch> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
9 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
10 |
# Don't show directory listings for URLs which map to a directory. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
11 |
Options -Indexes |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
12 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
13 |
# Follow symbolic links in this directory. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
14 |
Options +FollowSymLinks |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
15 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
16 |
# Make Drupal handle any 404 errors. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
17 |
ErrorDocument 404 /index.php |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
18 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
19 |
# Force simple error message for requests for non-existent favicon.ico. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
20 |
<Files favicon.ico> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
21 |
# There is no end quote below, for compatibility with Apache 1.3. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
22 |
ErrorDocument 404 "The requested file favicon.ico was not found. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
23 |
</Files> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
24 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
25 |
# Set the default handler. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
26 |
DirectoryIndex drupal/index.php |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
27 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
28 |
# Override PHP settings. More in sites/default/settings.php |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
29 |
# but the following cannot be changed at runtime. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
30 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
31 |
# PHP 4, Apache 1. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
32 |
<IfModule mod_php4.c> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
33 |
php_value magic_quotes_gpc 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
34 |
php_value register_globals 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
35 |
php_value session.auto_start 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
36 |
php_value mbstring.http_input pass |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
37 |
php_value mbstring.http_output pass |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
38 |
php_value mbstring.encoding_translation 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
39 |
</IfModule> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
40 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
41 |
# PHP 4, Apache 2. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
42 |
<IfModule sapi_apache2.c> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
43 |
php_value magic_quotes_gpc 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
44 |
php_value register_globals 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
45 |
php_value session.auto_start 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
46 |
php_value mbstring.http_input pass |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
47 |
php_value mbstring.http_output pass |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
48 |
php_value mbstring.encoding_translation 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
49 |
</IfModule> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
50 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
51 |
# PHP 5, Apache 1 and 2. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
52 |
<IfModule mod_php5.c> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
53 |
php_value magic_quotes_gpc 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
54 |
php_value register_globals 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
55 |
php_value session.auto_start 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
56 |
php_value mbstring.http_input pass |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
57 |
php_value mbstring.http_output pass |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
58 |
php_value mbstring.encoding_translation 0 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
59 |
</IfModule> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
60 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
61 |
# Requires mod_expires to be enabled. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
62 |
<IfModule mod_expires.c> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
63 |
# Enable expirations. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
64 |
ExpiresActive On |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
65 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
66 |
# Cache all files for 2 weeks after access (A). |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
67 |
ExpiresDefault A1209600 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
68 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
69 |
# Do not cache dynamically generated pages. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
70 |
ExpiresByType text/html A1 |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
71 |
</IfModule> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
72 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
73 |
# Various rewrite rules. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
74 |
<IfModule mod_rewrite.c> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
75 |
RewriteEngine on |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
76 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
77 |
# If your site can be accessed both with and without the 'www.' prefix, you |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
78 |
# can use one of the following settings to redirect users to your preferred |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
79 |
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
80 |
# |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
81 |
# To redirect all users to access the site WITH the 'www.' prefix, |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
82 |
# (http://example.com/... will be redirected to http://www.example.com/...) |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
83 |
# adapt and uncomment the following: |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
84 |
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC] |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
85 |
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
86 |
# |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
87 |
# To redirect all users to access the site WITHOUT the 'www.' prefix, |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
88 |
# (http://www.example.com/... will be redirected to http://example.com/...) |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
89 |
# uncomment and adapt the following: |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
90 |
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
91 |
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
92 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
93 |
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
94 |
# VirtualDocumentRoot and the rewrite rules are not working properly. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
95 |
# For example if your site is at http://example.com/drupal uncomment and |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
96 |
# modify the following line: |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
97 |
# RewriteBase /drupal |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
98 |
# |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
99 |
# If your site is running in a VirtualDocumentRoot at http://example.com/, |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
100 |
# uncomment the following line: |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
101 |
RewriteBase / |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
102 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
103 |
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'. |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
104 |
RewriteCond %{REQUEST_FILENAME} !-f |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
105 |
RewriteCond %{REQUEST_FILENAME} !-d |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
106 |
RewriteCond %{REQUEST_URI} !=/favicon.ico |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
107 |
RewriteRule ^(.*)$ drupal/index.php?q=$1 [L,QSA] |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
108 |
</IfModule> |
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
109 |
|
0ff3ba646492
Create branch for drupal with first commit from local working copy
cavaliet@caf4f556-3d62-0410-8435-a86758001935
parents:
5
diff
changeset
|
110 |
# $Id: .htaccess,v 1.90.2.3 2008/12/10 20:04:08 goba Exp $ |