Secure URI on virtual server

Whats is best practice to secure a URI on a virtual server?

For example www.test.com/test/dev

If user enters that in there browser they should be able to access the site, but if the manually remove /dev so its only www.test.com/test they should be denied.

Cant find any settings that does this so my guess that you have to apply a iRule

Does anyone have a suggestion how to accomplish this

Best regards

Daniel

Use an LTM Traffic Policy to match the URIs and deny the client.