Как обрабатываются вики-статьи со слешами в заголовках?

237
chris

http://en.wikipedia.org/wiki/Nip/tuck

http://en.wikipedia.org/wiki/POW/MIA_flag

Проще говоря, как такие страницы обрабатываются сервером или вики? Существует ли каталог с именем POW, или вики используют какую-то переадресацию или маскировку для вставки буквального слеша в URL?

0
Во-первых, Wikipedia - это не каталог файлов, а программа PHP, которая берет URL-адрес, разбивает его на части и отображает соответствующую статью на основе запросов к базе данных. Во-вторых, не все вики одинаковы. Поведение Википедии иногда рассматривается как неправильное в других программах вики. digitxp 10 лет назад 5

1 ответ на вопрос

3
Martheen Cahya Paulo

From MediaWiki Subpages

In namespaces where the feature is switched off, any forward slashes (/) within a page name are simply part of the page name and do nothing special

Which mean, most of the times, they are just names. As digitxp said, Wikipedia works just like any other dynamic websites, consuming URLs and serve content from database queries. Technically, for large sites like Wikipedia most of the times the page you see is served from a Squid cache which store a static copy to be reused as long as it's current.

This behavior is only correct for Wikipedia. Other wikis could use different wiki engine with different caching strategy.

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