I have problem with routing. I have many pages on my site generated dynamically from database.
First thing which I want to accomplish is to route to these pages like that:
“How to repair a car”
http://www.EXAMPLE.com/How-to-repair-a-car
For now it works like that: http://www.EXAMPLE.com/Home/Index/How-to-repair-a-car
Secondly my default page have to be like that: http://www.EXAMPLE.com
On the Start Page will be news with pagging, so if someone click for instance in the “page 2” button, the address should looks: http://www.EXAMPLE.com/page =2
CONCLUSION:
- default page -> http://www.EXAMPLE.com (with page = 0)
- default page with specific page of news -> http://www.EXAMPLE.com/page=12
- article page -> http://www.EXAMPLE.com/How-to-repair-car (without parameter ‘page’) routing sholud point to article or error404
PS: sorry for my english
Try to create route for articles in routing config, like this:
Routing config:
HomeController:
/?page=10 – works
/How-to-repair-car – works
That approach excellent works.