When you use the default search option, you get a page similar to this:
mywordpress.com/?s=term1+term2
When in page 2 of the same search, the URL becomes:
mywordpress.com/page/2/?s=term1+term2
Notice that “+” is kept in the 1st and 2nd page?
So, now suppose that you don’t use the stock “s” param, but a custom param name for the purposes of another functionality/plugin/whatever else.
This time the 1st page’s URL will look like this:
mywordpress.com/?param1=term1+term2
BUT, the 2nd page will look like this:
mywordpress.com/page/2/?param1=term1%20term2
This time, the “+” is there only for the 1st page, and for the 2nd page it’s replaced by a “%20”
And if you use a Redirect checker tool, you will notice specifically a 301 Redirect is taking place from mywordpress.com/page/2/?param1=term1+term2 -> mywordpress.com/page/2/?param1=term1%20term2
Feel free to run a Recirect checker on this URL: /test/page/2/?param=test+page from the test installation of WP I installed for the purposes of this topic. And it’s a 100% stock installation, without any themes/plugins installed. Do you notice the redirect?
And IMO just because it works, it doesn’t mean that it isn’t strange… I don’t know if it’s a bug, but at least the redirect is caused by some piece of code… What code is it? And what purposes does it serve other than to destroy the uniformity of URLs between various pages?
I honestly don’t get it.
]]>