If a user hits a 404 I'd like the user to be redirected to the parent category.
The expected behaviour I'm looking for is the following examples
www.test.co.uk/category/product404page > www.test.co.uk/category/
www.test.co.uk/anothercategory/morecategories/product404page > www.test.co.uk/anothercategory/morecategories/
So something like the the following is required
location ^~ /dynamicrecursivedir/ {
try_files $uri ../;
}
Is this possible?