<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2953195118" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5855" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5855/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5855">#5855</a> replaces <code class="notranslate">wiki.openstreetmap.org</code> with <code class="notranslate">osm.wiki</code>, and now wiki link text has <code class="notranslate">... wiki/wiki ...</code> which looks redundant. Osm wiki is set up so that prefix is optional in most of the cases, that's why there's a proposal to remove the prefix: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2953195118" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5855" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5855/hovercard?comment_id=2758382889&comment_type=issue_comment" href="https://github.com/openstreetmap/openstreetmap-website/pull/5855#issuecomment-2758382889">#5855 (comment)</a>. When the prefix is actually optional is determined by mod_rewrite rules as I commented in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2953195118" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5855" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5855/hovercard?comment_id=2759174982&comment_type=issue_comment" href="https://github.com/openstreetmap/openstreetmap-website/pull/5855#issuecomment-2759174982">#5855 (comment)</a>. I don't want to reproduce those rules to check when it's safe to remove <code class="notranslate">/wiki</code>. Instead I'm using a simpler rule: <code class="notranslate">/wiki</code> can be removed if it's followed by <code class="notranslate">/</code> and an uppercase Latin letter, which is going to be true for most of the articles. Special pages skipped using <code class="notranslate">RewriteCond</code> all start with lowercase letters, therefore stripping <code class="notranslate">wiki</code> won't cause a collision with them and <code class="notranslate">RewriteRule</code> will execute and put <code class="notranslate">wiki</code> back. There are also rules for filenames, but I don't expect any collisions with them either.</p>
<p dir="auto"><a href="https://github.com/openstreetmap/chef/blob/0cad06b01638b433858a5be37f87c236084cb743/cookbooks/mediawiki/templates/default/apache.erb#L72-L92">https://github.com/openstreetmap/chef/blob/0cad06b01638b433858a5be37f87c236084cb743/cookbooks/mediawiki/templates/default/apache.erb#L72-L92</a></p>
<p dir="auto">Technically I don't need to check all those rules because I'm not changing the <code class="notranslate">href</code>, I'm just changing the link text. But I still want that text to be something that can be pasted into the location bar and work as the original link.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5858'>https://github.com/openstreetmap/openstreetmap-website/pull/5858</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5858/commits/dfd67489c93bc9bb0ed989bd16eca5e4b4ff67be" class="commit-link">dfd6748</a>  Remove /wiki prefix from wiki urls in linkify</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5858/files">3 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5858/files#diff-e769bbb8c1ba3711c5403b424ed9c218ffafba7f1890ee394717196f28ff4540">config/settings.yml</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5858/files#diff-6854f233485e4f1bf82ed21283e3637f9114d7c5431b80926ba2f5657b54e9fb">lib/rich_text.rb</a>
    (16)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5858/files#diff-c1cefbd36a92f5d74850361751b9b01c7d326221cfa8c15c0c071008165de745">test/lib/rich_text_test.rb</a>
    (44)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5858.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5858.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5858.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5858.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5858">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLP4VCOCMOGNEUBSEAL2WS34BAVCNFSM6AAAAABZ6QEXFCVHI2DSMVQWIX3LMV43ASLTON2WKOZSHE2TIOBZGQZTANA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOONVNJZUX2NUW2H5L2WS34BA5CNFSM6AAAAABZ6QEXFCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHLAIA34A.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5858</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5858",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5858",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>