On Jan 13, 2012, at 7:31 AM, Jonathan Lundell wrote: > On Jan 13, 2012, at 7:22 AM, Web2Py Freak wrote: > >> ok i did request_uri and got None ?? i want the full url with tha >> domain and args because i want to use it for the facebook like > > It's possible that you need to enable routing to set request_uri (I'm not > sure). This is how the router builds it; you could try it yourself: > > request_uri = request.env.path_info + (request.env.query_string and ('?' + > request.env.query_string) or '')
Another way to see the URL from web2py's point of view is to use URL(). request_uri = URL(args=request.args, vars=request.vars, host=True) ...where host=True asks for an absolute URL (you can specify a host name if you want). I haven't tested this particular call, so I might have some details wrong. It has the advantage of rewriting the URL if any rewriting is necessary.