Changing default word separator in URLs?

At the moment, if you put a string into parameters in a URL Rails will
delimit them using +

E.g. The title of a page might be “My Great New Page”, Rails maps it
nicely onto - and then handles this when
used at the destination action.

Does anyone know if the + character can be swapped for a hypen -, a
plugin or custom function that overrides the Rails function would be
ideal. Google seems to regard a hypen as a word separator thus making
the URLs a little bit more search engine friendly.

On Jul 4, 2006, at 12:33 AM, David S. wrote:

the URLs a little bit more search engine friendly.
The ‘+’ is the CGI-escaped version of a space (aka, %20). I don’t
think you’ll be able to change this. From a search-engine
perspective, however, the , the and the tags
are just as (if not more) important as the URL.


Rob B.
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs