Legacy URLs should redirect with 301
Migrated issue
Reported by: jhodgdon
We have a number of "legacy" URLs in api_menu().
They are being redirected using drupal_goto(), but apparently not getting a 301, because Google returns them in search results.
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.
The URLs in question are:
api.drupal.org/api/search/(branch)/(keywords)
api.drupal.org/api/(type)/(stuff)/(branch)
api.drupal.org/api/(types)/(branch)
Here:
- (branch) is something like 4.6 or 7 [this is Drupal core only]
- (keywords) are search terms
- (stuff) is some ... stuff...
- (type) is function, constant, global, file, group
- (types) is the same thing but plural
Example URLs: [more examples needed!]
https://api.drupal.org/api/function/ip_address/7
https://api.drupal.org/api/functions/7
https://api.drupal.org/api/search/7/ip_add
Related issue: Issue #2710455