redirect 404 when gallery is empty