I have a urls that look something like this:
/foo/bar/main:home
/foo/bar/main:about_us
/foo/bar/main:contact_us
As you can see I have : in the url, that needs to be taken into consideration. What I want is to match component Home to /foo/bar/main:home
, but any other path /foo/bar/main:XXXXX
to match component Default.
What I have tried so far:
<Route path={'/foo/bar/main:home'} component={Home} />
<Route path={'/foo/bar/main:any'} component={Default} />
This matches the Home component all the time.
<Route path={'/foo/bar/main%3Ahome'} component={Home} />
<Route path={'/foo/bar/main:any'} component={Default} />
Now, Default is matched all the time. Any help would be appreciated. Thanks.