hi,all! I''m new to here.I have a problem about routing anchor or redirect url by anchors,for example: I want to request a url like "www.myhost.com/foo#bar" and then response a new url like "www.myhost.com/foo/bar". My problem is I don''t know how to read the anchor from a request. Any thought? thanks in advance :-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 2, 3:35 am, fanz <winstar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi,all! > I''m new to here.I have a problem about routing anchor or redirect url > by anchors,for example: > I want to request a url like "www.myhost.com/foo#bar" and then > response a new url like "www.myhost.com/foo/bar". My problem is I > don''t know how to read the anchor from a request. > Any thought? thanks in advance :-)Unfortunately, you can''t. Anchors are not passed to the server in the request. The only way to do anything with them is to read them on the client side with JavaScript, and pass information about them to the server. See this article for an example of how they''re used to maintain browser history: http://dev.aol.com/ajax-handling-bookmarks-and-back-button --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thanks for your answer, now I got it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---