Get 404 not found when URL different from /

39 views
Skip to first unread message

Francisco Reyes

unread,
Aug 22, 2011, 6:26:51 PM8/22/11
to we...@googlegroups.com
New to webpy. 
Made a trivial program:

------- index.wsgi
import web

urls = (
  '/', 'hello',
  '/bye', 'bye',
  '/tst', 'test')

application = web.application(urls, globals(),False).wsgifunc()

class hello:
    def GET(self):
        return 'Hello, web!'

class bye:
    def GET(self):
        return 'Bye, web!'

class test:
    def GET(self):
        return 'test class'

if __name__ == "__main__":
    app.run()

--------

If I point  
WSGIScriptAlias /       /usr/home/WWW/test/index.wsgi

it works with
/
/bye
/tst

However if I do
        WSGIScriptAlias /tst    /usr/home/WWW/test/index.wsgi
        WSGIScriptAlias /       /usr/home/WWW/test/index.wsgi

The URL /tst fails with a "not found" (404 error)

I thought maybe I was doing something with the WSGI setup, but I put a test WSGI script that outputs all environment variable to the browser and
WSGIScriptAlias /tst    /usr/home/WWW/test/test.wsgi

Worked fine.. so the issue seems to only be with webpy.

Any pointers greatly appreciated.

Main reason I am trying to have multiple WSGIScriptAlias is so as I do different tests I can easily diff programs and see I changes from one program to the next while I do tutorials and play with templates..
Reply all
Reply to author
Forward
0 new messages