<p>This probably has a very simple answer but cannot seem to get it working.</p>

<p>I have a 404.html template in craft/templates and it works fine within a section (such as <a href="https://shanehudson.net/articles/dfs" rel="nofollow">https://shanehudson.net/articles/dfs</a>) but not at all for non-existant pages in the root (such as <a href="https://shanehudson.net/404" rel="nofollow">https://shanehudson.net/404</a>). Any ideas?</p>

CC BY-SA 3.0
2014-09-16T15:29:10.293Z
What happens when it doesn't work? :)
André Elvan
CC BY-SA 3.0
2014-09-16T16:23:39.457Z
It shows the _layout template correctly but with no content.
Shane Hudson
CC BY-SA 3.0
2014-09-16T16:29:03.180Z
Do you have any routes defined that could be triggering? Can you check in chrome dev tools or similar, do the page return a HTTP 404 status, or a HTTP 200 (or something else)? You don't have any rewrite rules in your .htaccess that could cause this? Have you tried removing or running a minimal .htaccess file to see if you get the same response?
André Elvan
CC BY-SA 3.0
2014-09-16T17:08:31.397Z
+1 for @AndréElvan's comment. I'd guess either a custom route or .htaccess rule.
Brad Bell
CC BY-SA 3.0
2014-09-18T01:34:33.603Z
Ah I tried and you are right about the dynamic urls. I need the entry types to be root pages. Such as https://shanehudson.net/articles, but if the slug for entry type doesn't exist, it should 404.
Shane Hudson
CC BY-SA 3.0
2014-09-18T14:01:02.723Z
@ShaneHudson Can you update your question with more details about that? (e.g. a screenshot of your Route, and the contents of the template that the route points to)
Brandon Kelly
<404-page>
404 Page Not Showing
# 404 Page Not Showing

(Asked by: username_0 on 2014-09-16)

This probably has a very simple answer but cannot seem to get it working.

I have a 404.html template in craft/templates and it works fine within a section (such as <https://shanehudson.net/articles/dfs>) but not at all for non-existant pages in the root (such as <https://shanehudson.net/404>). Any ideas?

**Tags:** 404-page

> **Comments:**
> **username_1**: What happens when it doesn't work? :)  
> **username_0**: It shows the _layout template correctly but with no content.  
> **username_1**: Do you have any routes defined that could be triggering? Can you check in chrome dev tools or similar, do the page return a HTTP 404 status, or a HTTP 200 (or something else)? You don't have any rewrite rules in your .htaccess that could cause this? Have you tried removing or running a minimal .htaccess file to see if you get the same response?  
> **username_2**: +1 for @AndréElvan's comment. I'd guess either a custom route or .htaccess rule.  
> **username_0**: Ah I tried and you are right about the dynamic urls. I need the entry types to be root pages. Such as https://shanehudson.net/articles, but if the slug for entry type doesn't exist, it should 404.  
> **username_3**: @ShaneHudson Can you update your question with more details about that? (e.g. a screenshot of your Route, and the contents of the template that the route points to)  

---

## 0 answers

