python - lighttpd, mod_rewrite, web.py -


i've small issue lighttpd , web.py. runs fine on apache2 there's small issue on lighttpd.

here's lighttpd config web.py

  fastcgi.server = ("/code.py" =>     ((       "socket" => "/tmp/fcgi.socket",       "bin-path" => "/home/ivan/www/code.py",       "max-procs" => 1,       "check-local" => "disable",     ))   )    url.rewrite-once = (      "^/favicon.ico$" => "/static/favicon.ico",      "^/static/(.*)$" => "/static/$1",      "^/(.*)$" => "/code.py/$1"    ) 

and sample web.py demonstrate how i've defined urls.

urls = (   '/page', 'page',   '/', 'index', )  class index(object):   def get(self):     raise web.seeother('/page') 

the problem occurs when browser redirected example.org/page url. apache2 redirects example.org/page lighttpd redirects example.org/code.py/page. how can fix small issue? i've found solution, if write raise web.seeother(web.ctx.homedomain+'/page') fine i'd know if can solved in lighttpd config file instead of touching web.py code.

thanks,

before spawning script fastcgi set

export real_script_name="" 

this should work.


Comments

Popular posts from this blog

sql server - python to mssql encoding problem -

java - SNMP4J General Variable Binding Error -

c# - BasicHttpBinding equivalent CustomBinding using WCF Client and PHP WebService -