I redirect single result searches to their respective pages, but I pass the “?s=whatever” query along with it so that I can show a “you have been redirected” bar with a search form pre-propagated with the query.
This works great when users search for things in the standard WP core search areas (content, title, etc), but when the query is found in a custom field (or anything else that Search Everything enables) I get a 404 on the redirected page.
I think this is because Search Everything is trying to trigger another search, but I’m not certain. Here’s what I’ve discovered so far:
No problems (because the query was found in the content): http://gearside.com/nebula/maecenas-porttitor-scelerisque-porta/?s=Fusce+gravida+nunc+ut+nisi+cursus+scelerisque
404 (because the query was found in a custom field): http://gearside.com/nebula/documentation/custom-functionality/file-type-indicators/?s=path%20to%20the%20document
- The topic ‘Prevent 404s when "?s" is in the URL’ is closed to new replies.