【问题标题】:CODEIGNITER 3 : Page not found, cannot reach controllerCODEIGNITER 3:找不到页面,无法到达控制器
【发布时间】:2021-10-29 20:31:50
【问题描述】:

我的 codeigniter 3 应用程序有问题。应用程序文件夹位于名为“grease”的子文件夹中:/grease/application/...

base_url 是这样的:https:///grease/

我尝试转到此页面,例如:https:///grease/Auth,我收到错误“找不到页面,找不到您请求的页面”

我的控制器名和类名以大写字母开头

.htaccess 文件如下所示:

Options +SymlinksIfOwnerMatch 
Options -Indexes
RewriteEngine on
RewriteCond $1 !^(index\.php|assets/|robots\.txt|piwik/|crontab/)
RewriteRule ^(.*)$ index.php/$1 [L]
php_value post_max_size 300M
php_value memory_limit 2048M
php_value upload_max_filesize 300M

你能帮帮我吗?
谢谢

【问题讨论】:

    标签: php .htaccess codeigniter model-view-controller controller


    【解决方案1】:

    如果您的应用在子文件夹中运行,则您需要在 .htaccess 中添加 RewriteBase 指令em> 文件。

    RewriteBase /YOUR-SUBFOLDER
    

    【讨论】:

    • 感谢您的回答。但是我有一个错误:“内部服务器错误,服务器遇到内部错误或配置错误,无法完成您的请求”
    猜你喜欢
    • 2013-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-21
    • 1970-01-01
    • 1970-01-01
    • 2011-02-14
    相关资源
    最近更新 更多