апачский URL / имя файла со специальными символами

Это зависит полностью от программного обеспечения списка рассылки. Почтальон вставляет заголовок для обнаружения циклов, но если другой список рассылки не является Почтальоном, он может снять изоляцию с него и препятствовать тому, чтобы он работал.

6
задан 13 March 2015 в 21:47
2 ответа

Возможно, вам потребуется нормализовать кодировку имен файлов в форме Unicode NFC . См. Связанный вопрос StackOverflow 12643402 . Один из инструментов, который вы можете использовать, - это convmv , который должен быть доступен в CentOS .

3
ответ дан 3 December 2019 в 00:38

RFC 3986 §2.5 recommends that non-ASCII characters first be represented in the UTF-8 character encoding, then each byte of that encoding should be percent-encoded. However, the older RFC 2396 does not recommend any particular character encoding. Therefore, the browser's behaviour when you enter an address containing non-ASCII characters into the address bar is implementation dependent, particularly if you are using an older browser. For example, Internet Explorer 7 on Windows and Safari 6 on OS X does not exhibit the problem you described.

Your website appears to be running on the LiteSpeed Web Server, a proprietary clone of Apache. When LiteSpeed generates URLs of the links in the directory index, it is not percent-encoding the non-ASCII characters in the filenames, leading to the ambiguous situation described above. In contrast, Apache 2.2.16 does percent-encode the UTF-8 representation of the filenames, so your problem would not occur on Apache. Perhaps a newer version of LiteSpeed could solve your problem. It's also possible that specifying IndexOptions Charset=UTF-8 could help. Since LiteSpeed is proprietary, I can't really help you; you'll have to contact their technical support. Judging from the fact that your server emits instead of , I would guess that LiteSpeed's directory-index-generating code is not based on any recent version of Apache.

0
ответ дан 3 December 2019 в 00:38

Теги

Похожие вопросы