1

我的主持人帐户类似于:

~
~/public_html
~/public_html/system/application

要访问我的网站,我需要在地址栏中输入http://example.com/~userid

我在 ~/public_html 目录中安装了 codeigniter,我可以访问http://example.com/~userid

欢迎页面正确显示,相关的用户指南页面正确显示。

问题是:如果我创建一个新控制器并创建新视图,网页只会显示“错误 404:找不到文档”。如果我使用http://example.com/~userid/welcome/index它有同样的问题。

如果我使用 base_url() 函数,它会显示http://example.com/~userid/

我该怎么做才能解决这个问题?

提前致谢!

4

1 回答 1

3

试试http://example.com/~userid/index.php/welcome/index

看起来您的 URL 重写未设置或配置错误。如果禁用 URL 重写,这是默认方式。

编辑参见用户指南的这个页面,特别是关于如何设置 URL 重写的“删除 index.php 文件”部分。

于 2009-12-15T22:55:54.490 回答