# Homepage as index.rhtml, not index.html?

**URL:** <https://www.ruby-forum.com/t/homepage-as-index-rhtml-not-index-html/89291>\
**Category:** Rails\
**Created:** [March 28, 2006, 7:29pm UTC](https://www.ruby-forum.com/t/homepage-as-index-rhtml-not-index-html/89291 "2006-03-28T19:29:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thechak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aeb1de/32.png) [@thechak](https://www.ruby-forum.com/u/thechak)\
**Post date:** [March 28, 2006, 7:29pm UTC](https://www.ruby-forum.com/t/homepage-as-index-rhtml-not-index-html/89291/1 "2006-03-28T19:29:26Z")

</div>

Hi all,

I’m building my first Rails app. Please forgive my ignorance as I get  
acquainted with the technology.

What I’d like to do is have a form that the scaffolding created for me  
appear on my home page. It’s just one text field, a submit button, and  
some error messages.

I first tried to copy the code from the new.rhtml view into the homepage  
(index.html), then realized I had to change the filename to rhtml.  
Doing so seemed to confuse the Routing.

I also considered putting an iframe onto the homepage, but that seems  
awkward to me.

Can someone please help a rookie? Thanks!

---

<div class="post-metadata">

**Author:** ![thechak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aeb1de/32.png) [@thechak](https://www.ruby-forum.com/u/thechak)\
**Post date:** [March 28, 2006, 7:47pm UTC](https://www.ruby-forum.com/t/homepage-as-index-rhtml-not-index-html/89291/2 "2006-03-28T19:47:29Z")

</div>

Hi ~

.rhtml files are template files and are stored in the views folder.  
.rhtml files will not be processed in the public directory. What you  
want to do is change the default route in your config/routes.rb file.

Something like:

map.connect “”, :controller =\> “your\_controller\_here”

Hope this helps,

Ben

On 3/28/06, Dan C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> (index.html), then realized I had to change the filename to rhtml.  
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Ben R.  
[http://www.benr75.com](http://www.benr75.com)

---

<div class="post-metadata">

**Author:** ![thechak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aeb1de/32.png) [@thechak](https://www.ruby-forum.com/u/thechak)\
**Post date:** [March 28, 2006, 8:29pm UTC](https://www.ruby-forum.com/t/homepage-as-index-rhtml-not-index-html/89291/3 "2006-03-28T20:29:14Z")

</div>

Ben,

Perfect! Thank you.

The section on config/routes.rb in Agile Web D. on Rails (pg.  
291) was also helpful.

Dan
