Web2py 默认应用程序

发布于 2024-09-06 06:44:05 字数 244 浏览 4 评论 0原文

我计划很快使用 dreamhost 设置文档

我的问题是我希望 www.mydomain.com 直接转到我的新应用程序,而不是需要转到 web2py.mydomain.com/MyApp/Default。

解决这个问题的最佳方法是什么?我是否使用 DNS 重定向或者可以通过 web2py 配置来完成此操作?

I am planning to publish my site soon on Dreamhost using passenger WSGI as mentioned in the dreamhost setup documentation.

My issue is that I am wanting www.mydomain.com to go directly to my new application, instead of needing to go to web2py.mydomain.com/MyApp/Default.

What is the best way to solve this issue? Do I use DNS redirects or can this be done through the web2py configuration?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

仙气飘飘 2024-09-13 06:44:05

自 web2py 版本 1.83(2010 年 8 月 11 日)以来可用的另一个选项:

默认应用程序、控制器和功能
通过设置适当的值,可以将默认应用程序、控制器和函数的名称分别从 initdefaultindex 更改为其他名称在routes.py中:

default_application = "myapp"
default_controller = "admin"
default_function = "start"

Another option available since web2py version 1.83 (Aug 11, 2010):

Default Application, Controller, and Function
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:

default_application = "myapp"
default_controller = "admin"
default_function = "start"
离去的眼神 2024-09-13 06:44:05

你可以在 web2py 中。您有两个选择:
1) 调用您的应用程序“init”

2) 使用路由进行映射。创建文件 web2py/routes.py 并在其中添加

routes_in=[('/','/MyApp/default/index')]

You can in web2py. You have two options:
1) call your app "init"

2) use routes to do the mapping. Create a file web2py/routes.py and in it add

routes_in=[('/','/MyApp/default/index')]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文