index.html.ru index.html.en /cgi-bin/script.frIn addition, if you use the correct language-dependent file extensions, your server will provide charset=... for Russian-language documents, and, if there is a theoretical possibility that this document will be sent with the use of another charset, the server will add the header: Expires: current_date_time (or Expires: 00:00:01 Jan 1970, depending on the compilation keys). This header will warn the proxy servers that it is undesirable to retain this document in the cache of the proxy. One should not be afraid that cross-references in all documents will have to be rewritten in this case. It is not true. If a document with the filename file.html.ru is situated at the server, the server will be able to find a file with this name if the client's request is
GET /file.htmlHowever, to achieve this, one should add Options . . . MultiViews in the description of the home directory of the server in the conf/access.conf file. For example:
<Directory /usr/local/etc/httpd/home> # This may also be "None", "All", or any combination of "Indexes", # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". # Note that "MultiViews" must be named *explicitly* - "Options All" # doesn't give it to you (or at least, not yet). Options Indexes FollowSymLinks Includes MultiViews </Directory>If the majority of documents at your server are in Russian, we recommend that you add the entry
AddLanguage ru .html .shtml .ruto conf/srm.conf. Then, charset=... will be provided for all *.html and *.shtml documents, except for those in other languages. If you also use other file extensions (.htm, .cgi) and the majority of these files are in Russian, it is worthwhile to mention these extensions in AddLanguage too.
If you have the possibility to use different IP addresses for different virtual servers, we also recommend you to do this, because such an approach will require less computer resources compared to "arrangement": of encodings by ports. In our opinion, the optimal configuration is like this:
If the use of virtual servers is impossible, we recommend that you construct the tree of Russian-language documents in a separate directory (for example, /koi8-r/), where documents are stored in their native charset. Afterwards, you make symbolic links like
ln -s home_of_server/koi8-r home_of_server/windows-1251 ln -s home_of_server/koi8-r home_of_server/ibm866or use the Alias mechanism in srm.conf:
Alias /koi8-r /document/root/here Alias /windows-1251 /document/root/hereWhich way to select is up to your taste. Document in these pseudo-directories will be provided to the client in the encoding that is specified in the prefix. Remember that cross-references in such a tree in this case should contain the path in relation to the current position of the document rather than the absolute path. This approach is now suitable for user's directories as well; that is, /~user/win/file.html will be presented in windows-1251.
"Russian Apache" includes software developed
by the Apache Group for use in the Apache HTTP server project
See Apache LICENSE.
Copyright (C) 1995-2001 The Apache Group. All rights reserved.
Copyright (C) 1996 Dm. Kryukov; Copyright (C) 1997-2009 Alex Tutubalin. Design (C) 1998 Max Smolev.