On Jul 4, 2006, at 12:33 AM, David Smalley wrote:
> 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 myapp.com/My+Great+New+Page - 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.
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 <title>, the <meta
name="description"
content="..." /> and the <meta name="keywords"
content="..." /> tags
are just as (if not more) important as the URL.
-Rob
Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com