Answers.Body: <p>I ran into a similar problem with categories and routing a while ago and Marion's answer in this thread worked for me</p>
  
  <p><a href="https://craftcms.stackexchange.com/questions/1291/how-would-i-include-the-first-category-slug-in-the-sections-entry-url-format">How would I include the first category slug in the section&#39;s entry URL format?</a></p>
  
  <p>Darrell</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-30T13:01:11.443Z
Answers.Text: Thanks Darrell
  Not sure if that is the same problem - I have a URI with category in it (not category name) followed by the category slug. Have got working in other contexts but in this instance is throwing a 404 error :(
Answers.UserDisplayName: Cole Henley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-30T14:06:54.257Z
Answers.Text: Silly questions but are all your categories coming from one group? If you have multiple groups, do they all have "Categories in this group have their own URLs" ticked? Just troubleshooting ;)
Answers.UserDisplayName: Oli
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-02T15:32:35.990Z
Answers.Text: More silly questions but is your template path correct in your route?
Answers.UserDisplayName: kcolls
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-30T12:44:39.523Z
Answers.LastActivityDate: 2015-11-30T12:44:39.523Z
Answers.LastEditDate: 2017-04-13T12:50:59.930Z
Answers.UserDisplayName: Darrell Wilson
Body: <p>I've set up some dynamic routes to work with categories, so for example the route is set up to load a specific template if the work category appears in the URI, thus:</p>
  
  <pre><code>news-events/image-gallery/category/[slug]
  </code></pre>
  
  <p>However, if I test with the following URL I get a 404 error:</p>
  
  <pre><code>/news-events/image-gallery/category/drama
  </code></pre>
  
  <p>Other dynamic routes are working fine. Thoughts on how to debug/resolve appreciated.</p>
  
  <p>Cole</p>
  
Tags: <routes><category><404>
Title: Dynamic route returning 404 error
ThreadText: # Dynamic route returning 404 error
  
  (Asked by: username_0 on 2015-11-30)
  
  I've set up some dynamic routes to work with categories, so for example the route is set up to load a specific template if the work category appears in the URI, thus:
  
  ```
  news-events/image-gallery/category/[slug]
  
  ```
  
  However, if I test with the following URL I get a 404 error:
  
  ```
  /news-events/image-gallery/category/drama
  
  ```
  
  Other dynamic routes are working fine. Thoughts on how to debug/resolve appreciated.
  
  username_0
  
  **Tags:** routes, category, 404
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-11-30. Score: 1
  
  I ran into a similar problem with categories and routing a while ago and Marion's answer in this thread worked for me
  
  [How would I include the first category slug in the section's entry URL format?](https://craftcms.stackexchange.com/questions/1291/how-would-i-include-the-first-category-slug-in-the-sections-entry-url-format)
  
  username_1
  
  > **Comments:**
  > **username_0**: Thanks username_1 Not sure if that is the same problem - I have a URI with category in it (not category name) followed by the category slug. Have got working in other contexts but in this instance is throwing a 404 error :(  
  > **username_2**: Silly questions but are all your categories coming from one group? If you have multiple groups, do they all have "Categories in this group have their own URLs" ticked? Just troubleshooting ;)  
  > **username_3**: More silly questions but is your template path correct in your route?  
  
  ---
  
  