# When rerouting URLs patterns which contain "::" they don't match

**URL:** <https://forum.getkirby.com/t/when-rerouting-urls-patterns-which-contain-they-dont-match/7977>\
**Category:** Questions\
**Tags:** v2\
**Created:** [July 14, 2017, 2:01pm UTC](https://forum.getkirby.com/t/when-rerouting-urls-patterns-which-contain-they-dont-match/7977 "2017-07-14T14:01:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scsskid](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/scsskid/32/4939_2.png) [@scsskid](https://forum.getkirby.com/u/scsskid)\
**Post date:** [July 14, 2017, 2:01pm UTC](https://forum.getkirby.com/t/when-rerouting-urls-patterns-which-contain-they-dont-match/7977/1 "2017-07-14T14:01:51Z")

</div>

Hi,

I have problem matching a pattern for a route

The following pattern is not matched

```
c::set('routes', array(
array(

  'pattern' => 'thing::([0-9]+)\.html',
  'action' => function ($numvar) {
     echo $numvar;
   }
 )

));

```

without the double colons it works perfectly (also with many other characters before the palceholder / regex)

```
c::set('routes', array(
array(

  'pattern' => 'thing([0-9]+)\.html',
  'action' => function ($numvar) {
     echo $numvar;
   }
 )

));

```

this actually echos $numvar

any suggestions, workarounds are much appreaciated

---

<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:** [July 14, 2017, 2:15pm UTC](https://forum.getkirby.com/t/when-rerouting-urls-patterns-which-contain-they-dont-match/7977/2 "2017-07-14T14:15:30Z")

</div>

Guess it is regarded as a parameter (because if I enter such an URL into the address bar - with or without the route - it returns the home page) and parameters can’t be used in routes.

---

<div class="post-metadata">

**Author:** ![scsskid](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/scsskid/32/4939_2.png) [@scsskid](https://forum.getkirby.com/u/scsskid)\
**Post date:** [July 14, 2017, 2:21pm UTC](https://forum.getkirby.com/t/when-rerouting-urls-patterns-which-contain-they-dont-match/7977/3 "2017-07-14T14:21:12Z")

</div>

Thanks for the answer

maybe I can try a combination of a htaccess rewrite and a kirby route then?

replacing ‘::’ with ‘–’ or similar?

I’ll try this in the mean time

Update: rewriting via .htaccess works, now kirby accepts the string, thanks

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:35pm UTC](https://forum.getkirby.com/t/when-rerouting-urls-patterns-which-contain-they-dont-match/7977/4 "2025-02-06T17:35:17Z")

</div>

Archived on February 6, 2025, 5:35pm UTC


