I think that this chain of 'item1+item2+item3' is your real problem.
The HTML standard is very specific about how parameters are specified: they must be separated from the URL with an interrogation sign (?) and that each parameter has the following syntax: name=encoded_value
. The parameter separator is the ampersand (&).
So the standard way of specifying parameters would be:
http://domain.com/events/14159-international-hardware-show-2010?number=91&username=prashant&year=2010&source=ALIBA.BACOM&hl=en&ct=clnk
A url like this will allow your controller to get the 91
in params[:number]
, "prashant"
in params[:username]
etc.
If for some reason you must conserve the nonstandard structure, you can. You will have to put all the non-standard parts inside a "big standard parameter".
http://domain.com/events/14159-international-hardware-show-2010?bigparameter=91+prashant+2010+OR+email+OR+data+OR+base+-ALIBA.BACOM&hl=en&ct=clnk
Now you will have the chain "91+prashant+2010+OR+email+OR+data+OR+base+-ALIBA.BACOM"
in params[:bigparameter]
. You will have to parse it yourself, though.
I strongly recommend following the first option. In general, it is a good idea to respect the standards (it means less issues and simplifies work).
In both cases, the "?" sign will makes the server differentiate between base url and parameters, so you will not have any issues with the url format.