# Usare solo lo slug come URL senza ID

**URL:** <https://meta.discourse.org/t/using-slug-only-as-url-without-id/174258>\
**Category:** Support\
**Created:** [25 Dicembre 2020, 4:19pm UTC](https://meta.discourse.org/t/using-slug-only-as-url-without-id/174258 "2020-12-25T16:19:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [25 Dicembre 2020, 6:01pm UTC](https://meta.discourse.org/t/using-slug-only-as-url-without-id/174258/3 "2020-12-25T18:01:03Z")

</div>

Questo è il comportamento previsto.

Discourse supporta i 3 tipi:

- Completo: [https://meta.discourse.org/t/using-slug-only-as-url-without-id/174258](https://meta.discourse.org/t/using-slug-only-as-url-without-id/174258)
- Solo ID: [https://meta.discourse.org/t/174258](https://meta.discourse.org/t/174258)
- Solo slug: [https://meta.discourse.org/t/using-slug-only-as-url-without-id](https://meta.discourse.org/t/using-slug-only-as-url-without-id)

Tuttavia, se lo slug inizia con un numero, gestiamo il caso in modo speciale e cerchiamo il primo numero come ID:

> <https://github.com/discourse/discourse/blob/main/app/controllers/topics_controller.rb#L65-L70>

---

_[View the full topic](https://meta.discourse.org/t/using-slug-only-as-url-without-id/174258)._
