The standard Oil Filter Heads have a small by-pass valve built in to them so if the filter becomes blocked, it will by-pass the filter. Better dirty oil than no oil is the thinking but IMO, not a solution for poor maintenance !
Some after-market heads, like these from Swifty's have no by-pass (but there is still one in the filter itself). Often the angle of the inlet pipe to them doesn't suit the standard pipework and so you need to fit a flex line here. I gotta say, I'm not crazy about flex lines as probably 5 times out of 10, they eventually leak.