We upgraded to EE 7, which uses Pro Search and it works great. However, previously, the result URL would display the search parameters in the URL. It’s my understanding that ExpressionEngine automatically generates search result URLs with random strings to prevent caching issues, but that’s not very friendly for users and, I assume, search engines. Is there a way to revert this to display search parameters in the URL?
A simple example when choosing Flower Color > White:
Current URL = https://springmeadownursery.com/plantfinder/results/eyJyZXN1bHRfcGFnZSI6InNlYXJjaFwvcGxhbnRfcmVzdWx0c19vbmx5Iiwib3JkZXJieSI6ImlzX2ZlYXR1cmVkX3N0aWNreXxib3RhbmljYWxfbmFtZV9nZW51c3xib3RhbmljYWxfbmFtZV9zcGVjaWVzfHVybF90aXRsZSIsImNoaWxkOmZsb3dlcl9jb2xvciI6IjEwMCIsInNlYXJjaDpjdXJyZW50bHlfYXZhaWxhYmxlIjoiMSJ9
We’d like it to look like the Previous URL = https://springmeadownursery.com/plantfinder/filter/flower_color/white
Note there are 10 fields that can be included within the filter.
There is a setting in Pro search to turn on explicit display of the search query in the URL.
The old old EE search did use a random string. The new Pro Search string is actually Base64 of the query and is consistent for a given search. But yeah displaying the search string is better I think.
TTFN Travis
The only setting I saw in Pro Search for EE7 was to turn on or off Encode Query. Turning it on creates the random character URL such as: /plantfinder/results/eyJyZXN1bHRfcGFnZSI6InNlYXJjaFwvcGxhbnRfcmVzdWx0c19vbmx5Iiwib3JkZXJieSI6ImlzX2ZlYXR1cmVkX3N0aWNreXxib3RhbmljYWxfbmFtZV9nZW51c3xib3RhbmljYWxfbmFtZV9zcGVjaWVzfHVybF90aXRsZSIsInNlYXJjaDp6b25lcyI6IlpvbmUgNSJ9
and turning it off just returns a URL of /plantfinder/results regardless of the filters that were entered.
As I said, that string is not random in Pro Search. It’s Base64 encoded and it says:
{"result_page":"search\/plant_results_only","orderby":"is_featured_sticky|botanical_name_genus|botanical_name_species|url_title","search:zones":"Zone 5"}
I don’t know why it’s not showing the query properly for you when you turn that setting off, if you want help debugging, get in touch.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.