When I run your example I get
/user/test
/user/test/program
I fail to see how that differs from what you want.
L7Sqr
Practically a Posting Shark
851 posts since Feb 2011
Reputation Points: 253
Solved Threads: 155
Skill Endorsements: 7
You've yet to show what you expect to be output against what you are getting for output. There is definitely something wrong - it's just difficult to understand where currently.
L7Sqr
Practically a Posting Shark
851 posts since Feb 2011
Reputation Points: 253
Solved Threads: 155
Skill Endorsements: 7