# Routing to the welcome page

**URL:** <https://www.ruby-forum.com/t/routing-to-the-welcome-page/110061>\
**Category:** Rails\
**Created:** [July 22, 2007, 9:05am UTC](https://www.ruby-forum.com/t/routing-to-the-welcome-page/110061 "2007-07-22T09:05:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xyzt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/839c29/32.png) [@xyzt](https://www.ruby-forum.com/u/xyzt)\
**Post date:** [July 22, 2007, 9:05am UTC](https://www.ruby-forum.com/t/routing-to-the-welcome-page/110061/1 "2007-07-22T09:05:45Z")

</div>

Hello

I want to setup the welcome page as the default page. so, i added the  
last line belove to my config/routes.rb file but nothing changes.

ActionController::Routing::Routes.draw do |map|

map.connect ‘:controller/:action/:id.:format’  
map.connect ‘:controller/:action/:id’  
map.connect ‘’, :controller=\>‘main’, :action=\>‘welcome’  
end

it still do not open the main/welcome when i type  
“[http://localhost:3000/](http://localhost:3000/)”. what’s the problem?

Thanks.

---

<div class="post-metadata">

**Author:** ![xyzt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/839c29/32.png) [@xyzt](https://www.ruby-forum.com/u/xyzt)\
**Post date:** [July 22, 2007, 9:27am UTC](https://www.ruby-forum.com/t/routing-to-the-welcome-page/110061/2 "2007-07-22T09:27:44Z")

</div>

BahadÄ±r DoÄŸan wrote:

> Hello
> 
> I want to setup the welcome page as the default page. so, i added the  
> last line belove to my config/routes.rb file but nothing changes.
> 
> ActionController::Routing::Routes.draw do |map|
> 
> map.connect ‘:controller/:action/:id.:format’  
> map.connect ‘:controller/:action/:id’  
> map.connect ‘’, :controller=\>‘main’, :action=\>‘welcome’  
> end
> 
> it still do not open the main/welcome when i type  
> “[http://localhost:3000/](http://localhost:3000/)”. what’s the problem?
> 
> Thanks.

two things:

a) put  
map.connect ‘’, :controller=\>‘main’, :action=\>‘welcome’  
on the top line

b) remove the index.html file that is in pubic … it may be overriding  
the route defined. (via the server which redirects there ; lighttpd /  
ngnix / what-ever-server )

---

<div class="post-metadata">

**Author:** ![xyzt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/839c29/32.png) [@xyzt](https://www.ruby-forum.com/u/xyzt)\
**Post date:** [July 22, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/routing-to-the-welcome-page/110061/3 "2007-07-22T23:23:44Z")

</div>

thank you.that solved the problem.
