Multiple matching in react-router or ambiguous routing
<p>I have a task to build routing which maintains 2 type of components: sidebar and content. If the url contains <code>category-:type</code> I have to render Sidebar component and if url contains any content type like <code>profile</code>, <code>about</code> or <code>seller</code> I have to render proper content.<br>
If create <code>&lt;Route /&gt;</code> for each combination of sidebar and content type there will be a lot of items.<br>
How can I build routing for this purpose? 
As I know I can't use routing like <code>&lt;Route path="/**/:profile" component={Profile}&gt;</code> because if Router will match this path it will stop and avoid other comparison.</p>

<p>Here is my current routing </p>

<pre><code>const history = syncHistoryWithStore(browserHistory, routing);
ReactDOM.render(
   &lt;Router history={history}&gt;
      &lt;Route path="/" component={Base}&gt;
         &lt;IndexRedirect to="signin" /&gt;
         &lt;Route path="n=:id/:title" component={Item} /&gt;
         &lt;Route path="search(/:type)" component={require_auth(Search)} /&gt;
         &lt;Route path="people(/:type)" component={require_auth(People_Layout)} /&gt;
         &lt;Route path="person/:id" component={require_auth(Person_Scene_Layout)} /&gt;
         &lt;Route path="signin" component={Signin} /&gt;
         &lt;Route path="signup" component={Signup} /&gt;
         &lt;Route path="profile" component={require_auth(Profile)} /&gt;
      &lt;/Route&gt;
   &lt;/Router&gt;
   , document.querySelector('#appRoot')
);
</code></pre>

<p>So, I have to extend this code to allow navigation on sidebar at the same time. I need to preserve current routing and add routing for matching Sidebar, something like <code>&lt;Route path="category-:type/n=:id/:title" component={Item} /&gt;</code>. This routing can render both <code>&lt;Sidebar/&gt;</code> and <code>&lt;Item/&gt;</code> components but to make this work with all other routing I have to double almost all existing routes.</p>