Routing and extensions

I would like my something like “my_page.html” to map to :controller =>
‘page’, :action => ‘my_page’. How can I accomplish that?

Is there a way to make the routing parse other things other than ‘/’?

K. Adam Christensen wrote:

I would like my something like “my_page.html” to map to :controller =>
‘page’, :action => ‘my_page’. How can I accomplish that?

Is there a way to make the routing parse other things other than ‘/’?

What I have done is perform some checking in the controller to get this
to work. This feels sloppy. Does anyone have any other ideas?

I’m trying to integrate an old site that used php and other html pages
to ruby, and I don’t want to have to change all of the links and
whatnot, because there is legacy there.

bump

map.connect ‘/mypage/mypage.html’, :controller => “mypage”, :action =>
“mypage”

K. Adam Christensen wrote:

Mohammad wrote:

map.connect ‘/mypage/mypage.html’, :controller => “mypage”, :action =>
“mypage”

is there a way to do that where in the first argument of
‘/mypage/mypage.html’, something like ‘/:controller/:action.html’(which
doesn’t work). I can use a variable of some sort. I do not want to
re-map all of the pages on this site like that.
map.connect ‘/mypage/:action’, :controller => “mypage”
now for making :action.html I would see if that works it might. But
:action is a hash so it might take it as a command so…

Mohammad wrote:

map.connect ‘/mypage/mypage.html’, :controller => “mypage”, :action =>
“mypage”

is there a way to do that where in the first argument of
‘/mypage/mypage.html’, something like ‘/:controller/:action.html’(which
doesn’t work). I can use a variable of some sort. I do not want to
re-map all of the pages on this site like that.