8c086db6 |
1 | HOW TO CONFIGURE SQUIRREL-MAIL WITH RUSSIAN APACHE |
2 | -------------------------------------------------- |
3 | |
4 | This howto is for people who are using Russian Apache and |
5 | who use charsets other than koi8-r for their source documents. |
6 | If you _do_ use KOI8-R as default encoding for all your source |
7 | documents, you don't need to do anything. Otherwise, here's |
8 | a very simple way to make this work. |
9 | |
10 | The general idea is to tell Russian Apache that everything |
11 | residing in the squirrel-mail directory is in koi8-r. This |
12 | way all input submitted by users will be automagically |
13 | converted by mod_charset from anything into koi8-r. |
14 | Squirrel-Mail will then correctly stamp it with |
15 | "Charset=koi8-r" and send off without any additional |
16 | conversion. |
17 | |
18 | There are two equally efficient ways to do it: |
19 | |
20 | |
21 | 1. THE HTTPD.CONF WAY. |
22 | ----------------------- |
23 | |
24 | In your httpd.conf, add the following declaration for the |
25 | server that handles the squirrel-mail: |
26 | |
27 | <Directory /path/to/your/squirrel-mail> |
28 | CharsetSourceEnc koi8-r |
29 | </Directory> |
30 | |
31 | Warning: If you use CharsetByExtension elsewhere, it will |
32 | override the CharsetSourceEnc directive. In that case you will |
33 | have to put this directive instead of the above: |
34 | |
35 | <Directory /path/to/your/squirrel-mail> |
36 | CharsetByExtension koi8-r .php |
37 | </Directory> |
38 | |
39 | It is advised to use the CharsetSourceEnc declaration instead |
40 | of the other one. Use the CharsetByExtension only if the |
41 | other fails. |
42 | |
43 | 2. THE .HTACCESS WAY (PREFERRED). |
44 | ---------------------------------- |
45 | |
46 | Create a .htaccess file in your squirrel-mail directory. In it, |
47 | simply put this line: |
48 | |
49 | CharsetSourceEnc koi8-r |
50 | |
51 | That's it. Note the warning about the ChatsetByExtension directive |
52 | in the previous section. If you used CharsetByExtension declaration |
53 | elsewhere and it's active for this server, then you will have to |
54 | put this line in your .htaccess instead: |
55 | |
56 | CharsetByExtension koi8-r .php |
57 | |
58 | But again, this is only if the CharsetSourceEnc fails. |
59 | |
60 | I mark this method "Preferred" simply because you don't have to |
61 | restart your server if you use .htaccess. However, if you've |
62 | specified "AllowOverride None" in your Server config, then you |
63 | will have to go with "the httpd.conf way". |
64 | |
65 | |
66 | If you have any questions or problems, please address them to |
67 | the squirrelmail-list@lists.sourceforge.net to have them |
68 | promptly answered. ;) |
69 | |
70 | -- |
71 | Konstantin Riabitsev (a.k.a. Graf) |
72 | graf@relhum.org |