Custom 404 for a directory

Hello!

Is it possible to have two separate 404 pages, one for all 404s and the other for 404s in the /shop directory? For example, could I have people see/404.php for /392423 but /404Shop.php for an errors like /shop/123?

Thanks.

You could code your 404.php to check the referrer and send the visitor to 404shop.php if they came from the shop directory.

Edit. It’s more likely the request URI you need to check.

1 Like

What server are you running? Apache? NGiNX? something else?

Yup :slight_smile:

1 Like

Thanks! I will give that a try.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.