On Fri, Jul 4, 2008 at 2:29 AM, code_martial <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I have configured a URL structure in routing that looks like this:
>
> map.connect('myapp/search/:sstring/page:page/', controller='myapp',
> action='search')
>
> So, for example, in the following URL:
>
> myapp/search/some%20term/page2/,
>
> sstring = "some term"
> page = 2
>
> Now the problem I face is that if the :sstring part contains a '/'
> somewhere, the URL turns into a 404. Is there a way to specify the
> route such that anything after 'myapp/search/' and upto '/page:page'
> gets assigned to :sstring?

That's what wildcards are for.  "*string".

Just remember they can't be next to a variable on either side.  In
this case it looks like you're safe because "/page" is static.

However, Routes 1 has some ambiguities so you'll really just have to
try it and see if it works.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to