The web2py book and documentation has led me to believe that the following would work;http://120.0.0.1/myapp/default/somefunction can be written as http://120.0.0.1/myapp/somefunction but I get invalid request error
web2py maps a URL of the form:
1. http://127.0.0.1:8000/a/c/f.htmlto the function
f()in controller "c.py" in application "a". Iffis not present, web2py defaults to theindexcontroller function. Ifcis not present, web2py defaults to the "default.py" controller, and ifais not present, web2py defaults to theinitapplication. If there is noinitapplication, web2py tries to run thewelcomeapplication.
If I then overwrite routes.py using routes.example.py, the above case no longer works. Looking at both routes.example.py and router.example.py, it looks like both of them configure web2py's routing behavior in the same way, but the actual behavior is not the same.
When using the pattern-based system, the name of the default application, controller, and function can be changed from init, default, and index respectively to another name by setting the appropriate value in routes.py