Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-11T07:36:29.873Z
Answers.LastActivityDate: 2014-08-11T07:36:29.873Z
Answers.UserDisplayName: Steven Vandemoortele
Answers.Body: <p>Not sure why you are escaping the / right in front of the regex. Maybe thats the issue?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-08T15:53:54.403Z
Answers.Text: Also I think you have to remove the trailing / after _detail
Answers.UserDisplayName: pythic
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-08T15:48:31.277Z
Answers.LastActivityDate: 2014-08-08T15:48:31.277Z
Answers.UserDisplayName: pythic
Body: <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>
  
Tags: <plugin-development>
Title: registerCpRoutes gives 404
ThreadText: # 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<listId>\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](http://buildwithcraft.com/docs/plugins/templates#dynamic-url-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  
  
  ---
  
  