# Question concerning the Blog in Kirby 3.5.1

**URL:** <https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163>\
**Category:** Questions\
**Tags:** v3\
**Created:** [February 11, 2021, 10:01am UTC](https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163 "2021-02-11T10:01:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nedimbora](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nedimbora/32/5015_2.png) [@nedimbora](https://forum.getkirby.com/u/nedimbora)\
**Post date:** [February 11, 2021, 10:01am UTC](https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163/1 "2021-02-11T10:01:19Z")

</div>

Hello,

I was wondering if I could use the features of the blog (e.g. tags, categories, summaries, rendering all blog entries together on a page) and yet create a different url?

More explicitely:

Instead of [my-site.com/blog/entry](http://my-site.com/blog/entry)  
Create [my-site.com/entry](http://my-site.com/entry)

Thanks for any help.

Best

Nedim

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [February 11, 2021, 10:46am UTC](https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163/2 "2021-02-11T10:46:29Z")

</div>

Yes, that’s possible via routes and additionally optionally a model that creates the modified URL.

> **[Routing](https://getkirby.com/docs/guide/routing)**
>
> Use Kirby's router to modify URLs or provide extra functionality when the user calls an given URI pattern.

> [@Routing 101 - Remove part of the URL](https://forum.getkirby.com/t/routing-101-remove-part-of-the-url/12368/4):
>
> As I said, if you use the new syntax in your config.php, it will/should work: \<?php return ['debug' =\> false, 'routes' =\> [[ 'pattern' =\> '(:any)', 'action' =\> function($uid) { $page = page($uid); if(!$page) $page = page('project/' . $uid); if(!$page) $page = site()-\>errorPage(); return site()-\>visit($page); }], [ 'pattern' =\> 'project/(:any)', …

---

<div class="post-metadata">

**Author:** ![nedimbora](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nedimbora/32/5015_2.png) [@nedimbora](https://forum.getkirby.com/u/nedimbora)\
**Post date:** [February 12, 2021, 10:00pm UTC](https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163/3 "2021-02-12T22:00:16Z")

</div>

Thank you. That works fine.

Follow up question:  
what if I have more than one page with subpages?  
E.g.: [my-site.com/blog/entry](http://my-site.com/blog/entry), [my-site.com/films/entry](http://my-site.com/films/entry)

How would the config file look like then?

Best,

Nedim

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 12, 2021, 10:06pm UTC](https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163/4 "2021-02-12T22:06:41Z")

</div>

You could use an array of patterns, and you would have to check if the wanted pages is a subfolder either of parent one, two or whatever.

Note that URLs need to be unique, so you have to make sure that your folder slugs between the children of blog and the children of film (and possible other parents), do not collide.

---

<div class="post-metadata">

**Author:** ![nedimbora](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nedimbora/32/5015_2.png) [@nedimbora](https://forum.getkirby.com/u/nedimbora)\
**Post date:** [February 12, 2021, 10:15pm UTC](https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163/5 "2021-02-12T22:15:06Z")

</div>

I understand that the URLs must be unique. Bu cannot understand the rest. Missing PHP knowhow. ☹ Sorry.

This is what I used in the config.php:

```
    'routes' => [
    [
        'pattern' => '(:any)',
        'action' => function($uid) {
            $page = page($uid);
            if(!$page) $page = page('journal/' . $uid);
            if(!$page) $page = site()->errorPage();
            return site()->visit($page);
        }
    ],
    [
        'pattern' => 'journal/(:any)',
        'action' => function($uid) {
            go($uid);
        }
    ]
],

```

So if I also want to implement the same for all subpages under the “films” page, would I just duplicate the code above and change “journal” with “films”?

Thank you in advance.

Nedim

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 12, 2021, 10:19pm UTC](https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163/6 "2021-02-12T22:19:14Z")

</div>

```auto
'routes' => [
    [
        'pattern' => '(:any)',
        'action' => function($uid) {
            $page = page($uid);
            if(!$page) $page = page('journal/' . $uid);
            if(!$page) $page = page('film/' . $uid);
            if(!$page) $page = site()->errorPage();
            return site()->visit($page);
        }
    ],
    [
        'pattern' => ['journal/(:any)', 'film/(:any)'],
        'action' => function($uid) {
            go($uid);
        }
    ]
],

```

---

<div class="post-metadata">

**Author:** ![nedimbora](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nedimbora/32/5015_2.png) [@nedimbora](https://forum.getkirby.com/u/nedimbora)\
**Post date:** [February 12, 2021, 10:19pm UTC](https://forum.getkirby.com/t/question-concerning-the-blog-in-kirby-3-5-1/21163/7 "2021-02-12T22:19:41Z")

</div>

Thank you very much!
