External check with generated path in url

Hello guys,
it’s possible to make an script based on the path of the URL given by client like :
www.website.com/path01
i didn’t find a way to use the url with generated path in external script check .

The objectif it’s to take the url : www.website.com/(path01-02-...-n) and grep the name of path(01-…-n), test with this name in which server it is available ( server 1 - 2 ) and redirecter in the server when the path is created

I hope I was clear