There are couple of modules for this.
Often times site builders want certain types of content to appear in a specific position in the navigational menu. The simplest solution, adding all of that content individually to the menu system, has performance and usability issues. (Imagine hundreds of menu items added to one spot in the menu.)
This module allows for the creation of rules that will dynamically add the current page into the menu system at the requested spots.
2) Menu Trail By Path
Menu Trail By Path sets the active-trail on menu items according to the current url.
For example if you are at yoursite.com/blog/category1/article1
Menu Items with these paths will get the active-trail class on them and expand accordingly.
Note: I'm not sure about(didn't use) Menu Trail By Path module. but I used Menu Position module and works great for me.