# My custom route generates 404

**URL:** <https://meta.discourse.org/t/my-custom-route-generates-404/48170>\
**Category:** Development\
**Created:** [8월 3, 2016, 3:53오후 UTC](https://meta.discourse.org/t/my-custom-route-generates-404/48170 "2016-08-03T15:53:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)\
**Post date:** [8월 3, 2016, 3:53오후 UTC](https://meta.discourse.org/t/my-custom-route-generates-404/48170/1 "2016-08-03T15:53:43Z")

</div>

Hello,  
I’m trying to get new site section working..

I’ve got .json part succesfully serving data ([http://localhost/faq\_categories.json](http://localhost/faq_categories.json))

But for HTML request ([http://localhost/faq\_categories](http://localhost/faq_categories)) Discourse generates 404 not found “Oops! That page doesn’t exist or is private”. I do have proper erb.html file in place.

I think that routing is working correctly (otherwise there would be error). Is there any part of Discourse application that would prevent me to run this simple code correctly?

Can you please help me to find what am I missing? Thanks a lot…!

**`/discourse/config/routes.rb`**

> get “/faq\_categories” =\> “faq\_categories#index”

**`/discourse/app/controllers/faq_categories_controller.rb`**

> class FaqCategoriesController \< ApplicationController  
> def index  
> @faq\_categories = FaqCategory.all

> ```
> respond_to do |format|
> format.html do
> render :index
> end
> format.json do
> render_serialized(@faq_categories, FaqCategorySerializer)
> end
> end
> 
> ```
> 
> end  
> end

**`discourse/app/views/faq_categories/index.html.erb`**

> `
> 
> # Frequently Asked Questions
> `

---

_[View the full topic](https://meta.discourse.org/t/my-custom-route-generates-404/48170)._
