Answers.Body: <p>I'd always defer to a Brad Bell answer, but if for some reason you needed to maintain the URI format and wanted to still customize a route you could use the Routes section of settings. <a href="https://docs.craftcms.com/v3/routing.html#dynamic-routes" rel="nofollow noreferrer">https://docs.craftcms.com/v3/routing.html#dynamic-routes</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-09T19:41:31.577Z
Answers.LastActivityDate: 2019-08-09T19:41:31.577Z
Answers.UserDisplayName: Jessie Gilligan
Answers.Body: <p>In Craft 3 under your section config change the URL config</p>
  
  <p><a href="https://docs.craftcms.com/v3/sections-and-entries.html#sections" rel="nofollow noreferrer">https://docs.craftcms.com/v3/sections-and-entries.html#sections</a></p>
  
  <p>SEE: Entry URI Formats</p>
  
  <p>You can select what template it should render and what URL config you want</p>
  
  <p>Failing this you can use something more advanced:</p>
  
  <p><a href="https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules" rel="nofollow noreferrer">https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-12T07:18:37.497Z
Answers.Text: Thanks, I've done both but it doesn't seem to work.
  
  Is there something wrong with this code?
  
  `code:
  return [
  
      // Route videos/{slug} to a template
      'videos/<entrySlug:{slug}>' => ['template' => 'templates/videos/_entry'],
  
  ];`
Answers.UserDisplayName: Sebastiaan Schillebeeckx
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-12T07:34:38.267Z
Answers.Text: What error are you getting? Page not found or Variable "entry" does not exist.
Answers.UserDisplayName: Dean Sanderson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-12T07:46:56.927Z
Answers.Text: "Not Found
  The requested URL /videos/elia was not found on this server.
  
  Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
Answers.UserDisplayName: Sebastiaan Schillebeeckx
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-12T07:56:05.540Z
Answers.Text: Remove templates/ from your template variable, try: 'videos/<entrySlug:{slug}>' => ['template' => 'videos/_entry']
Answers.UserDisplayName: Dean Sanderson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-12T19:50:24.773Z
Answers.Text: That also doesn't work. Maybe I have to do something with my folder structure?
Answers.UserDisplayName: Sebastiaan Schillebeeckx
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-13T05:46:53.780Z
Answers.Text: Yeh templates don’t go in the web folder normally. The template folder should be along side the web folder. Shouldn’t be much in the web folder really only index and a few resource filesz
Answers.UserDisplayName: Dean Sanderson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-14T12:22:29.647Z
Answers.Text: If everything is working by accessing: /cms/web/videos/barco-auro your rule needs to be:
  
   'videos/<entrySlug:{slug}>' => ['template' => '/cms/web/videos/_entry']
Answers.UserDisplayName: Dean Sanderson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-09T18:05:53.057Z
Answers.LastActivityDate: 2019-08-09T19:23:48.097Z
Answers.LastEditDate: 2019-08-09T19:23:48.097Z
Answers.UserDisplayName: Dean Sanderson
Body: <p>I got entries in the folder /cms/web/videos/ and the url display this: <a href="http://domainname.com/cms/web/videos/barco-auro" rel="nofollow noreferrer">http://domainname.com/cms/web/videos/barco-auro</a>.</p>
  
  <p>I want it to be this: <a href="http://domainname.com/videos/barco-auro" rel="nofollow noreferrer">http://domainname.com/videos/barco-auro</a>.</p>
  
  <p>How do I create clean URLs? I don't find anything on this, or nothing that helps my problem.</p>
  
Tags: <url><slug><entry-slug><uri>
Title: How to remove something from the slug/url
ThreadText: # How to remove something from the slug/url
  
  (Asked by: username_0 on 2019-08-09)
  
  I got entries in the folder /cms/web/videos/ and the url display this: <http://domainname.com/cms/web/videos/barco-auro>.
  
  I want it to be this: <http://domainname.com/videos/barco-auro>.
  
  How do I create clean URLs? I don't find anything on this, or nothing that helps my problem.
  
  **Tags:** url, slug, entry-slug, uri
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-08-09. Score: 2
  
  I'd always defer to a Brad Bell answer, but if for some reason you needed to maintain the URI format and wanted to still customize a route you could use the Routes section of settings. <https://docs.craftcms.com/v3/routing.html#dynamic-routes>
  
  
  ---
  
  ### Answer by username_2 on 2019-08-09. Score: 2
  
  In Craft 3 under your section config change the URL config
  
  <https://docs.craftcms.com/v3/sections-and-entries.html#sections>
  
  SEE: Entry URI Formats
  
  You can select what template it should render and what URL config you want
  
  Failing this you can use something more advanced:
  
  <https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules>
  
  > **Comments:**
  > **username_0**: Thanks, I've done both but it doesn't seem to work.  Is there something wrong with this code?  `code: return [      // Route videos/{slug} to a template     'videos/<entrySlug:{slug}>' => ['template' => 'templates/videos/_entry'],  ];`  
  > **username_2**: What error are you getting? Page not found or Variable "entry" does not exist.  
  > **username_0**: "Not Found The requested URL /videos/elia was not found on this server.  Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."  
  > **username_2**: Remove templates/ from your template variable, try: 'videos/<entrySlug:{slug}>' => ['template' => 'videos/_entry']  
  > **username_0**: That also doesn't work. Maybe I have to do something with my folder structure?  
  > **username_2**: Yeh templates don’t go in the web folder normally. The template folder should be along side the web folder. Shouldn’t be much in the web folder really only index and a few resource filesz  
  > **username_2**: If everything is working by accessing: /cms/web/videos/barco-auro your rule needs to be:   'videos/<entrySlug:{slug}>' => ['template' => '/cms/web/videos/_entry']  
  
  ---
  
  