Similar routes for frappe ui and frappe site

i am using frappe ui. i have two simmilar routes /action one for frappe ui site and one for frappe site so how can manage this.