Ahh, so this REAL_SCRIPT_PATH variable is used for this. I thought that it is set by some exotic web servers instead of SCRIPT_PATH :))
Currently I'm running web.py as cgi script, because I don't have access neither to fast_cgi nor mod_python. Regards, tomekM On Sun, Sep 28, 2008 at 4:13 AM, Anand Chitipothu <[EMAIL PROTECTED]>wrote: > > On Sun, Sep 28, 2008 at 3:51 AM, tomekM <[EMAIL PROTECTED]> wrote: > > Hello. > > > > May I ask how do you deal with url rewriting? I have in my app rewrite > rule > > like this: > > > > /apps/(.*) --> /web.cgi/$1 > > > > But, when I use web.url() to prepare hrefs, I'm getting /web.cgi/sth/foo, > > instead of /apps/sth/foo. > > This is because web.ctx.homepath is initialized by env['SCRIPT_NAME']. > > You need to set environment variable REAL_SCRIPT_PATH as /app > > If you are using lighttpd fastcgi, you can do that by adding this to > your fastcgi configuration. > > "bin-environment" => ( > "REAL_SCRIPT_NAME" => "/app" > ), > > > > -- If you had one shot, or one opportunity To seize everything you ever wanted - One moment Would you capture it or just let it slip? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
