Entry Form: redirect not working 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.

&lt;input type="hidden" name="redirect" value="viewentry/{id}"&gt;


But if I replace the entry id with the slug in the browser (example.com/viewentry/example), then it works.
Try replacing {id} with {slug}. I guess it needs a slug, not an ID.