fyi, this was the bit that worked;
error_page 404 = @notfound;
location @notfound {
rewrite ^/(.*)$ https://forum.dangerousthings.com/search?q=$1 last;
}
fyi, this was the bit that worked;
error_page 404 = @notfound;
location @notfound {
rewrite ^/(.*)$ https://forum.dangerousthings.com/search?q=$1 last;
}
Yeah, I should have said that This is part of the rewrite rules. The example I rewrote (regex are not an issue, nginx I donât use often) came from this blog post.
I am glad you got it working. (Fixed the URL)
thatâs awesome! could you add the same rule to the base url to search the store too?
And f.dngr.us gives a 403 error so doesnât redirect to the forum
fixed
actually after messing about with it a bit I realized I canât⌠the reason is that I donât have hardly any of the products set up in this way as explicit redirects⌠for example, dngr.us/next is not actually set up to redirect⌠I rely on the default redirect to a product page to do this⌠so if I changed all 404s to redirect to the search, then all my product shortlinks would redirect to search results instead⌠less elegant
ah, fair. All good
maybe you could have a rule on the store that 404s redirect to a search?
possibly⌠there is already some sort of redirect mechanism at work there⌠kinda like a pseudo-search function⌠basically if youâre kinda close to a product name it will just assume you meant that product⌠but itâs very low intelligence.