<p>Whoops! Sorry. As I went to check the code I realised, I was using <code>{{ category.uri }}</code> instead of <code>{{ category.url }}</code>.</p>

CC BY-SA 3.0
2016-08-18T20:55:56.363Z
2016-08-18T21:09:59.487Z
2016-08-18T21:09:59.487Z
Terry Upton
<p>In my general config I have enabled URLS to have trailing slashes.</p>

<pre><code>'addTrailingSlashesToUrls' =&gt; true,
</code></pre>

<p>This is working for products and entries. But it is not working on Categories. Category links are not adding trailing slashes.</p>

<p>Is there some additional config I need to add/setup or is this a bug?</p>

CC BY-SA 3.0
2016-08-18T17:23:53.887Z
Can you share the code you're using to generate the links? Have you made any modifications to the stock public `.htaccess` file (assuming you're running Apache)?
Brad Bell
CC BY-SA 3.0
2016-08-18T18:04:44.500Z
Whoops! Sorry Brad. As I went to check the code I realised, I was using {{ category.uri }} instead of {{ category.url }}.
Terry Upton
CC BY-SA 3.0
2016-08-18T18:06:06.000Z
Incidentally what exactly is uri?
Terry Upton
CC BY-SA 3.0
2016-08-18T18:39:45.443Z
Ahh... would you mind adding that as an answer? There's a good venn diagram here on URI vs. URL vs. URN: https://danielmiessler.com/study/url-uri/
Brad Bell
<categories>
Categories not adding trailing slash
# Categories not adding trailing slash

(Asked by: username_0 on 2016-08-18)

In my general config I have enabled URLS to have trailing slashes.
'addTrailingSlashesToUrls' => true,

This is working for products and entries. But it is not working on Categories. Category links are not adding trailing slashes.
Is there some additional config I need to add/setup or is this a bug?

**Tags:** categories
> **Comments:**
> **username_1**: Can you share the code you're using to generate the links? Have you made any modifications to the stock public `.htaccess` file (assuming you're running Apache)?  
> **username_0**: Whoops! Sorry Brad. As I went to check the code I realised, I was using {{ category.uri }} instead of {{ category.url }}.  
> **username_0**: Incidentally what exactly is uri?  
> **username_1**: Ahh... would you mind adding that as an answer? There's a good venn diagram here on URI vs. URL vs. URN: https://danielmiessler.com/study/url-uri/  

---

## 1 answers

### Answer by username_0 on 2016-08-18. Score: 4 | Accepted answer

Whoops! Sorry. As I went to check the code I realised, I was using `{{ category.uri }}` instead of `{{ category.url }}`.


---

