Rails reading url query string from invalid route -


this question follow-up question previous 1 can found here. if have website www.foo.com , user types in www.foo.com/blahblahblah want redirect root path , able manipulate text blahblahblah. used solution proposed on question rob davis , works correctly part -- if user types in www.foo.com/a/b/c redirects root path , string a/b/c correctly being stored in params[:not_found]. however, if user enters question mark, www.foo.com/a?b=c gets stored in params[:not_found] a , ?b=c vanishes. how ensure question mark or not, text after www.foo.com/ gets stored in params[:not_found]?

again, please first read question , solution here. if can answer question awesome!

rails routes can match patches, not querystrings.

if use first example rob davis gave (the 1 without redirect), you'll able inspect querystring parameters using:

request.query_string 

check this, might useful well: rails routing query string


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -