How do I access URL parameters from my custom module?
The function arg() will do that for you. For example, in path http://siteurl/products/%items,  


arg(0) will have the value products (first value after your $base_url)
arg(1) will have the value of %items (second value).  


You might then just apply your logic, in this this case you could do the check arg(1).