Newbie question on url friendliness

If I wanted to use a friendly url, say, http://www.something.com/my-url,
how would I go about doing that? I can’t define an action my-url, and I
don’t want to clutter my routes up…

Is there a way to do this?

On 6/5/06, Ken K. [email protected] wrote:

If I wanted to use a friendly url, say, http://www.something.com/my-url,
how would I go about doing that? I can’t define an action my-url, and I
don’t want to clutter my routes up…

Is there a way to do this?

Yes, by routes. Not sure what you mean by clutter…
Joe

Joe Van D. wrote:

On 6/5/06, Ken K. [email protected] wrote:

If I wanted to use a friendly url, say, http://www.something.com/my-url,
how would I go about doing that? I can’t define an action my-url, and I
don’t want to clutter my routes up…

Is there a way to do this?

Yes, by routes. Not sure what you mean by clutter…
Joe

If I have a lot of urls that I would like to do a - instead of a
underscore, wouldn’t that take a lot of lines?

Not sure what you mean, can you please clarify?

I use this:
map.connect ‘:id’, :controller => “pages”, :action => ‘view’

Which allows URLs to be simple like http://www.mysite.com/123

…where 123 is the ID sent to the view action of the pages controller.