# Comportamento de reescrita de URL do Discourse falhando devido a subpasta

**URL:** <https://meta.discourse.org/t/discourse-rewriting-url-path-behaviour-failing-due-to-subfolder/94120>\
**Category:** Bug\
**Tags:** subfolder\
**Created:** [Agosto 7, 2018, 1:40pm UTC](https://meta.discourse.org/t/discourse-rewriting-url-path-behaviour-failing-due-to-subfolder/94120 "2018-08-07T13:40:04Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [Agosto 7, 2018, 8:24pm UTC](https://meta.discourse.org/t/discourse-rewriting-url-path-behaviour-failing-due-to-subfolder/94120/3 "2018-08-07T20:24:07Z")

</div>

Using [safe mode](https://meta.discourse.org/t/53504?silent=true) to make sure there is no plugin or theme causing this

1 - correct link is requested  
2 - correct content is returned  
but then:  
3 - fetching 404 body

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/3/237b2649c8bba455ced3ac08ec767e391de6290c.png)

logging

```
[db5060] Started GET "/talk/t/talk-forums-disappearing/10681?safe_mode=no_custom%2Cno_plugins%2Conly_official" for 77.163.254.28 at 2018-08-07 20:19:10 +0000
[db5060] Processing by TopicsController#show as HTML
[db5060] Parameters: {"safe_mode"=>"no_custom,no_plugins,only_official", "slug"=>"talk-forums-disappearing", "topic_id"=>"10681"}
[db5060] Rendering topics/show.html.erb within layouts/application
[db5060] Rendered topics/show.html.erb within layouts/application (6.3ms)
[db5060] Rendered layouts/_head.html.erb (0.3ms)
[db5060] Rendered common/_discourse_stylesheet.html.erb (0.1ms)
[db5060] Rendered common/_special_font_face.html.erb (0.1ms)
[db5060] Rendered application/_header.html.erb (0.2ms)
[db5060] Rendered common/_discourse_javascript.html.erb (0.3ms)
[db5060] Completed 200 OK in 124ms (Views: 9.0ms | ActiveRecord: 26.0ms)

[db5060] Started GET "/talk/404-body?_=1533673157932" for 77.163.254.28 at 2018-08-07 20:19:12 +0000
[db5060] Processing by ExceptionsController#not_found_body as HTML
[db5060] Parameters: {"_"=>"1533673157932"}
[db5060] Rendering exceptions/not_found.html.erb
[db5060] Rendered exceptions/not_found.html.erb (15.3ms)
[db5060] Rendering html template
[db5060] Rendered html template (0.0ms)
[db5060] Completed 200 OK in 52ms (Views: 0.3ms | ActiveRecord: 11.6ms)

```

---

_[View the full topic](https://meta.discourse.org/t/discourse-rewriting-url-path-behaviour-failing-due-to-subfolder/94120)._
