Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Rewrite 404 in subdir to parent dir

$
0
0
Hi,

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?

Viewing all articles
Browse latest Browse all 4759

Trending Articles