[mod_python] [SPAM] URL returned by test.py

Peter Hollenbeck pwhbeck at gmail.com
Fri Nov 9 21:25:38 EST 2007


Apache root is /srv/www/htdocs

I open http://localhost/test.html
Test.html calls test.py
Test.py returns an html page with a link to an image in
/srv/www/htdocs/pics/1998/...
But the link displayed in the browser is
    http://localhost/test/test.py/pics/1998/...
not
    http://localhost/pics/1998/...

Can anyone tell me why this is?
What can I do to get the link without "/test/test.py"

Thanks very much,
Peter Hollenbeck


SUSE 10.2 Linux
Apache 2.2.4
mod_python 3.3.1 (I think)

/srv/www/htdocs/test.html:
      <html>
      <p>
      mod_python test
      <p>
      <form action="test/test.py/test" method="POST">
          <input type="submit">
      </form>
      </html>

/srv/www/htdocs/test/test.py
def test():
    link = '<a href="pics/1998/9804/bcsi/98042118.jpg"><img
src="pics/1998/9804/bcsi/98042118tn.jpg">Logging road</a>'

    htmlpage = '<html><body>'+link+'</body></html>'
    rc = """$"""
    rc = rc.replace('$', htmlpage)
    return rc


More information about the Mod_python mailing list