Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect legacy search and browse actions #3800

Merged
merged 2 commits into from
Apr 25, 2018
Merged

Conversation

di
Copy link
Member

@di di commented Apr 24, 2018

Fixes #3799.

  • Redirect /pypi/?:action=browse&c=<classifier_id> to /search/?c=<classifier_name>
  • Redirect /pypi?:action=search&term=foobar&submit=search to /search/?q=foobar

Copy link
Member

@ewdurbin ewdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks spot on.

Only one request: is there any way we can flash a message like "The link you followed to get here should be updated! Let the author know!" or similar.

@di
Copy link
Member Author

di commented Apr 24, 2018

@ewdurbin Can only flash messages for logged in sessions. We could do something with client-side includes to avoid the cache but... probably not worth the trouble IMO.

@di
Copy link
Member Author

di commented Apr 24, 2018

(Also it's possible they came from somewhere where that message isn't really actionable, e.g. Google: https://www.google.com/search?q=site%3Apypi.python.org+inurl%3Asearch+inurl%3Aaction)

@ewdurbin
Copy link
Member

Spiders should pick that up eventually though, right? 🕷

@di
Copy link
Member Author

di commented Apr 24, 2018

Yeah, especially b/c it's a 301, but still, a message like that isn't really appropriate for those users.

@dstufft dstufft merged commit 0a1f794 into pypi:master Apr 25, 2018
@dstufft dstufft deleted the legacy-redirect branch April 25, 2018 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants