I'm learning MVC and faced this challenge which I can't figure out how. When I was at beginning I'm happy with such URL:
http://www.domain.com/stories/1
where 1 is the ID of one story in the database.
Then I decided to put chapters for each story, to read each chapter I used such URL:
http://www.domain.com/chapters/1
where 1 is the ID of chapter in the database.
Now, I want readers to see what is the ID of the story they are reading, here's my ideal URL:
http://www.domain.com/stories/1/chapters/2
But how can I achieve this?
Thanks in advance.