Plugin: fix buisness plugin redirect issue #2648
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently you are not able to go to
https://wordpress.com/plugins/gumroad the user is redirected to https://wordpress.com/plugins/gumroad/business
This PR fixed this by making sure that the user is still able to visit any plugin slug.
It also make sure that we redirect users if they for some reason try to visit a plugin url that is not a buisness plugin. for example /akismet/buiness that they get redirected to /akismet instead.
To test
visit the following urls and make sure you end up the expected url.
http://calypso.localhost:3000/plugins/gumroad/business
http://calypso.localhost:3000/plugins/gumroad/
http://calypso.localhost:3000/plugins/jetpack/buisness
http://calypso.localhost:3000/plugins/gumroad/business/.comsite
http://calypso.localhost:3000/plugins/gumroad/.jetpack.site