We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Pro Search Results URL

How Do I?

leadmarketing's avatar
leadmarketing
31 posts
one year ago
leadmarketing's avatar leadmarketing

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.

       
Hop Studios's avatar
Hop Studios
481 posts
one year ago
Hop Studios's avatar Hop Studios

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

       
leadmarketing's avatar
leadmarketing
31 posts
one year ago
leadmarketing's avatar leadmarketing

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.

       
Hop Studios's avatar
Hop Studios
481 posts
one year ago
Hop Studios's avatar Hop Studios

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.

       
lejale's avatar
lejale
2 posts
10 months ago
lejale's avatar lejale

ExpressionEngine 7’s Pro Search automatically encodes search queries into base64-like strings to prevent caching issues Block Blast and improve performance. However, this approach makes URLs less readable for users and search engines. If you prefer clean URLs with visible search parameters, there are a few ways to achieve that.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.