<p>Fresh week, fresh look at things. I failed to notice that the regex was set to \d and my campaignmonitor "id" contained alphabetic characters.<br>
Changing it to \w fixed it.</p>

CC BY-SA 3.0
2014-08-11T07:36:29.873Z
2014-08-11T07:36:29.873Z
Steven Vandemoortele
<p>Not sure why you are escaping the / right in front of the regex. Maybe thats the issue?</p>

CC BY-SA 3.0
2014-08-08T15:53:54.403Z
Also I think you have to remove the trailing / after _detail
pythic
CC BY-SA 3.0
2014-08-08T15:48:31.277Z
2014-08-08T15:48:31.277Z
pythic
<p>In my main plugin file I have the following code in my registerCpRoutes fucntion:</p>

<pre><code>public function registerCpRoutes()
{
    return array(
        'campaignreports/subscribers/detail\/(?P&lt;listId&gt;\d+)' =&gt; 'campaignreports/subscribers/_detail/'
    );
}
</code></pre>

<p>I have a _detail.html template located in /templates/subscribers/_detail.html</p>

<p>For some reason this doesn't seem to work. I keep on getting a "Page not found" error.
As far as I can tell I have followed <a href="http://buildwithcraft.com/docs/plugins/templates#dynamic-url-routing" rel="nofollow">the docs on dynamic routing</a>
Any ideas on what is going wrong here?</p>

<p>PS: I have uninstalled &amp; reinstalled the plugin</p>

<plugin-development>
registerCpRoutes gives 404
# registerCpRoutes gives 404

(Asked by: username_0 on 2014-08-08)

In my main plugin file I have the following code in my registerCpRoutes fucntion:
public function registerCpRoutes()
{
    return array(
        'campaignreports/subscribers/detail\/(?P\d+)' => 'campaignreports/subscribers/_detail/'
    );
}

I have a _detail.html template located in /templates/subscribers/_detail.html
For some reason this doesn't seem to work. I keep on getting a "Page not found" error.
As far as I can tell I have followed the docs on dynamic routing
Any ideas on what is going wrong here?
PS: I have uninstalled & reinstalled the plugin

**Tags:** plugin-development


---

## 2 answers

### Answer by username_0 on 2014-08-11. Score: 0 | Accepted answer

Fresh week, fresh look at things. I failed to notice that the regex was set to \d and my campaignmonitor "id" contained alphabetic characters.  
Changing it to \w fixed it.


---

### Answer by username_1 on 2014-08-08. Score: 1

Not sure why you are escaping the / right in front of the regex. Maybe thats the issue?

> **Comments:**
> **username_1**: Also I think you have to remove the trailing / after _detail  

---

