getgrav / grav-plugin-simplesearch

Grav SimpleSearch Plugin
https://getgrav.org
MIT License
44 stars 55 forks source link

How-To? pre-populate search? #189

Open jason-unleashed opened 4 years ago

jason-unleashed commented 4 years ago

I want to change the 404 error page to include either the results from a simplesearch or the simple search form pre-populated with the offending url.

I recently "fixed" the URLs for all of my articles (all lowercase, no spaces) but I can't edit the httpd.conf to rewrite to lower and the .htaccess to change each character to lowercase seems to mess up the route (http://server/grav/Article > http://server/article) and I don't want to go down that hole.

Ideally, I want the error page to display search results. So the basic flow would be someone goes to http://server/grav/Some-Article and instead of displaying a static 404 error page it goes to a simplesearch results for "Some Article".