routes.py
################################################
routers = dict(
    BASE = dict(
        default_application = 'myapp',
        default_controller = 'mycontroller',
        default_function = 'function1',
        controllers = ['default', 'mycontroller', 'etc'],
        functions = ['function1', 'function2', 'function3'],
        applications = ["myapp", "admin"]
       )
)

###############################################

The hardest part is that you have to list each controller, app, function



On Thu, Aug 2, 2012 at 4:13 PM, Daniel Gonzalez <gonva...@gmail.com> wrote:

> Hi,
>
> I am running web2py with mod_wsgi behind apache. I have a single web2py
> application.
> I would like to do the following URL mapping:
>
> http://www.example.com/function1 -> myapp/mycontroller/function1
>
> Where myapp is my application, which is only one.
> I do not have lots of functions, so maybe I can create a single controller
> file, mycontroller.py
> And then I will define all functions that I need in that controller:
> function1, function2, ...
>
> How would I go about implementing this? Is this something that is better
> done at the apache level, or at the web2py level?
> What are the thoughts / strategies used by people more familiar with
> web2py?
>
> Thanks and regards,
> Daniel
>
> --
>
>
>
>

-- 



Reply via email to