That’s odd.

I put exactly the rule you proposed but the URL 
(http://localhost:8000/annonces?lat=48.8610181&lng=2.3140934&locality=Paris) 
ended up not being matched at all.

Log statement:
routes_in: [127.0.0.1:http://localhost:get /annonces] -> /annonces (not 
rewritten)

> Le 25 févr. 2015 à 13:07, Anthony <abasta...@gmail.com> a écrit :
> 
> You need to match and copy the query string explicitly:
> 
> ('/annonces$query', '301->/s$query')
> 
> On Wednesday, February 25, 2015 at 6:00:09 AM UTC-5, Louis Amon wrote:
> Hello,
> 
> I'm trying to map this URL : 
> localhost:8000/annonces?lat=48.8610181&lng=2.3140934&locality=Paris
> To this : localhost:8000/s/paris
> 
> (Full-text search hurrayyy)
> 
> 
> I'm using the pattern-based routes.py to do that :
> 
> routes_in =[...
>             ('/annonces', '301->/s'),
> ]
> 
> 
> But when I try to reach the URL above, I get redirected to "localhost:8000/s" 
> with no query string (no request.vars).
> 
> This is the rewrite log I get:
> routes_app: [127.0.0.1:http://localhost:get /annonces] [jestocke] -> jestocke
> 
> select routing parameters: jestocke
> 
> routes_in: [127.0.0.1:http://localhost:get /annonces] [301->/s\g<anything>] 
> -> 301->/s
> 
> routes_app: [127.0.0.1:http://localhost:get /s] [jestocke] -> jestocke
> 
> select routing parameters: jestocke
> 
> routes_in: [127.0.0.1:http://localhost:get /s] [/jestocke/offer/search] -> 
> /jestocke/offer/search
> 
> 
> Am I missing something there ?
> 
> -- 
> Resources:
> - http://web2py.com <http://web2py.com/>
> - http://web2py.com/book <http://web2py.com/book> (Documentation)
> - http://github.com/web2py/web2py <http://github.com/web2py/web2py> (Source 
> code)
> - https://code.google.com/p/web2py/issues/list 
> <https://code.google.com/p/web2py/issues/list> (Report Issues)
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "web2py-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/g1oVFepFQ5o/unsubscribe 
> <https://groups.google.com/d/topic/web2py/g1oVFepFQ5o/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> web2py+unsubscr...@googlegroups.com 
> <mailto:web2py+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to