Legacy URLs should redirect with 301
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #2710885. --> Reported by: [jhodgdon](https://www.drupal.org/user/155601) >>> <p>We have a number of "legacy" URLs in api_menu().</p> <p>They are being redirected using drupal_goto(), but apparently not getting a 301, because Google returns them in search results.</p> <p>They should get a 301 so that they eventually fade out. Or, alternatively, we should keep them around forever and mark them as non-legacy.</p> <p>The URLs in question are:</p> <p>api.drupal.org/api/search/(branch)/(keywords)<br> api.drupal.org/api/(type)/(stuff)/(branch)<br> api.drupal.org/api/(types)/(branch)</p> <p>Here:<br> - (branch) is something like 4.6 or 7 [this is Drupal core only]<br> - (keywords) are search terms<br> - (stuff) is some ... stuff...<br> - (type) is function, constant, global, file, group<br> - (types) is the same thing but plural</p> <p>Example URLs: [more examples needed!]<br> <a href="https://api.drupal.org/api/function/ip_address/7">https://api.drupal.org/api/function/ip_address/7</a><br> <a href="https://api.drupal.org/api/functions/7">https://api.drupal.org/api/functions/7</a><br> <a href="https://api.drupal.org/api/search/7/ip_add">https://api.drupal.org/api/search/7/ip_add</a></p> > Related issue: [Issue #2710455](https://www.drupal.org/node/2710455)
issue