Search URL Encoder
Search URL Encoder replaces messy query-string search URLs like ?q=red+shoes§ion=products with clean, shareable links such as /search/eyJxIjoi….
Features
- Clean URLs: encodes the search term plus any extra filters (section, category, sort order…) into a single URL-safe token.
- Tamper-proof links: optional HMAC signing with your Craft security key, so edited or forged links return a 404.
- Multiple search pages: set up separate profiles, each with its own URL path and results template.
- Twig helpers:
searchUrl(),|encodeSearchand|decodeSearch. - Drop-in form action: point your search form at
search-url-encoder/search/submitand the plugin handles the redirect.
Why use it?
Search result pages get tidy, consistent URLs that are easy to share, bookmark and link to, and are safe to cache.
Quick start
- Install the plugin and set the Search path and Results template in Settings → Plugins → Search URL Encoder.
- Add the action to your search form:
<form method="post">
{{ csrfInput() }}
{{ actionInput('search-url-encoder/search/submit') }}
<input type="search" name="q">
<button>Search</button>
</form>
- In your results template, use the
queryandsearchParamsvariables the plugin provides.
Requirements
- Craft CMS 5.0 or later
- PHP 8.2 or later
Full documentation is on GitHub.
Installation Instructions
To install this plugin, copy the command above to your terminal.
Reviews
This plugin doesn't have any reviews.
Active Installs
0
License
MIT
Last release
November 19, 2026