How about something like /Article/Title-of-the-Article? In that case, just 
look in request.args(0) for the article slug and use that to query the db. 
If it's possible for multiple articles to have the same title (or at least 
the same slug), then you could include the ID as an arg as well: 
/Article/112/Title-of-the-Article. Then just grab the ID from 
request.args(0). You could still include logic to check for request.vars.id 
for the legacy URLs.

Anthony

On Monday, February 10, 2014 10:44:48 AM UTC-5, BlueShadow wrote:
>
> Hi I would love if I could reach my Articles not only by this type of URL: 
> www.mydomain.com/Article?id=112 but also by this type of URL: 
> www.mydomain.com/Article:Title-of-the-Article (or something similar I 
> just want to have the Title of that Article in the URL). Is there an easy 
> way to do this? The old URLs still have to work! I would love to have a 
> redirect to my new type of URL.
> Thanks for your Help
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to