Answers.Body: <p>Try replacing <code>{id}</code> with <code>{slug}</code>. I guess it needs a slug, not an ID.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-29T14:18:00.347Z
Answers.Text: You're right - and the docs probably wrong. Thank you very much!
Answers.UserDisplayName: MISC
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-29T14:20:50.963Z
Answers.Text: Glad I could help :)
Answers.UserDisplayName: Gustavs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-29T14:13:03.883Z
Answers.LastActivityDate: 2016-07-29T14:13:03.883Z
Answers.UserDisplayName: Gustavs
Body: <p>I use a front-end entry form based on the official documentation (<a href="https://craftcms.com/docs/templating/entry-form" rel="nofollow">https://craftcms.com/docs/templating/entry-form</a>), but after saving the entry, I am running in an error 404 on the entry page.</p>
  
  <pre><code>&lt;input type="hidden" name="redirect" value="viewentry/{id}"&gt;
  </code></pre>
  
  <p>But if I replace the entry id with the slug in the browser (example.com/viewentry/example), then it works.</p>
  
Tags: <form><redirect><saveentry>
Title: Entry Form: redirect not working
ThreadText: # Entry Form: redirect not working
  
  (Asked by: username_0 on 2016-07-29)
  
  I use a front-end entry form based on the official documentation (<https://craftcms.com/docs/templating/entry-form>), but after saving the entry, I am running in an error 404 on the entry page.
  
  ```
  <input type="hidden" name="redirect" value="viewentry/{id}">
  
  ```
  
  But if I replace the entry id with the slug in the browser (example.com/viewentry/example), then it works.
  
  **Tags:** form, redirect, saveentry
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-29. Score: 1 | Accepted answer
  
  Try replacing `{id}` with `{slug}`. I guess it needs a slug, not an ID.
  
  > **Comments:**
  > **username_0**: You're right - and the docs probably wrong. Thank you very much!  
  > **username_1**: Glad I could help :)  
  
  ---
  
  