mysite.it/blog/all Which shows all the articles But it does not work for mysite.it/blog/view/hello_world showing the article
mysite.it/blog/view/hello_world works fine because the segment_1: blog is an EE template group. The related entries content will be displayed.
mysite.it/blog/view/hello_world doesn't work because segment_2: view is not a template group, is not processed, so 404 error message.
I'm using conditional tags to solve this URL problem, it's working fine.
Templates routes could help you too, less verbose that many conditional tags:
https://docs.expressionengine.com/latest/cp/design/routes.html https://docs.expressionengine.com/latest/urls/template_routes.html .
If the segment_2 (view) and you want to associate it with an entry, is not a EE template groups you could use the conditional tags:
{if segment_1 =="blog" && segment_2 =="view" && segment_3 !=""}
If this condition is false, the second will be called:
{if:elseif segment_1 == "blog" && segment_2 !="" && segment_3 =="" }
you can use too:
{if:elseif segment_1 == "blog" && segment_2 =="all" && segment_3 ==""}
The template code:
{if segment_1 =="blog" && segment_2 =="view" && segment_3 !=""}
{exp:channel:entries channel="your_channel" url_title="{segment_x}"}
........
{/exp:channel:entries}
{if:elseif segment_1 == "blog" && segment_2 !="" && segment_3 =="" }
{exp:channel:entries channel="you_channel" url_title="{segment_x}"}
........
{/exp:channel:entries}
{/if}
If needed, you can associate the url_title, with one of the segment (segment_1, segment_2...). https://docs.expressionengine.com/latest/channel/channel_entries.html#url-title