Hello guys, I have an app on production / live. Everything is all ok except
when I implement Routes.py
I have dug up the old threads in this group regarding routes.py to arrive
at this current solution, which I presume ought to be correct. I want to
highlight that on localhost, the routes.py is working great(*) , just after
reloading routes in admin, but not on the live server (I reload routes +
restart nginx).
(*) (to save others time, I have added extra comments in the code below to
show what worked despite being commented out in localhost, but are needed
on production servers)
What I want to achieve with routes.py:
(1) direct my domain name to the specific app, i.e. myapp.com ->
109.109.109.109/myapp (and of course remove "myapp" from the URL)
(2) remove "default" and "index" from the url.
This is my BASE routes.py
routers = dict(
BASE = dict(
default_application = 'app2',
domains = {
'myapp.com' : 'myapp',
},
applications = ['myapp','app2','admin'], #this can be commented out
in localhost
controllers = 'DEFAULT'
),
)
This is my APP routes.py
default_controller = 'default' # ordinarily set in app-specific routes.py
default_function = 'index' # ordinarily set in app-specific routes.py
functions = ['list','of','functions','in','default.py']#not needed in
localhost either
Observed behavior:
Loading the URL " myapp.com/ " (notice the ending "/"…) will load
myapp.com/welcome/default/index
Although the functions are listed (which is ALL the functions in
default.py, it still comes up "invalid request")
I have a live site for you to observe/test these stated behavior if
necessary, however will email you on a personal basis with the URL and
login to observe these behaviors.
All questions and comments are welcome … pls assist to help me live my app
:)
Thank you very much for extending assistance!!!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.