Try our conversational search powered by Generative AI!

Virtual routes in Episerver

Vote:
 

Hi,

I am trying to create a proof of concpet where I want to create a virtual route e.g /blog/category/blog123. Where blog123 doesnt exist as page in EPiserver. So isntead of getting 404  page i want to pick the url and search for any blog post that is tagged with blog123 and show the page under the url  /blog/category/blog123 (the canonical url will prevent the duplicate content). If no tagged blog will found then show 404 page.

The path to the virtual url could be any thing like /abc/def/blog/category/categoy2/blog123

/blog/category/myblog page might exist as a page in Episerver and the page should show as normal.

The only conistant thing is the url will always contains the /blog/ path

any ideas?

#194626
Jun 26, 2018 18:47
Vote:
 

hi,

have you checked examples of partial routing in Episerver? This might give you some ideas and right direction.

#194627
Jun 26, 2018 18:57
Vote:
 

There are a few nice getting-started blogposts by Jon:

http://jondjones.com/learn-episerver-cms/episerver-developers-guide/episerver-routing/dummys-guide-to-explaining-partial-routing-within-your-episerver

http://www.jondjones.com/learn-episerver-cms/episerver-developers-guide/episerver-routing/how-to-set-up-a-partial-router

(and a few more down in the suggested links)

#194715
Jun 28, 2018 17:48
Vote:
 

This sounds like a good fit for a partail router as Valdis mentioned.

#194727
Jun 29, 2018 5:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.