【问题标题】:error while uploading codeigniter 3 on godaddy .only the default controller is working在godaddy上上传codeigniter 3时出错。只有默认控制器在工作
【发布时间】:2018-07-19 19:27:23
【问题描述】:

我正在使用 codeigniter 版本 3。它在 localhost 中工作得非常好,但是当我尝试将其上传到 Godaddy 服务器时,只有默认控制器在工作。请任何人提出必要的配置更改。我尝试更改 .htaccess 文件但无法正常工作。

【问题讨论】:

  • 如果有人在godaddy或任何服务器上成功上传了codeignitor版本3,请提供代码。我急需。
  • .htaccess tweek for godaddy

标签: codeigniter


【解决方案1】:

我的 Godaddy 服务器上的工作配置。

.htaccess

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

routes.php

# Default
$route['default_controller'] = "home";

config.php

$config['base_url'] = '';
$config['index_page'] = '';


更新:
1) base_url()
2) robots.txt
3).htaccess

【讨论】:

  • 我在命名控制器时犯了一个错误。现在它可以工作了。现在谁能告诉我base_url的用途是什么......它是如何有效使用的......在htaccess中你(parag tyagi ) 使用过 robots\.txt ..你能解释一下 robots.txt 的有效使用吗,请提供链接以了解 htaccess 中定义的规则。我问了太多问题。但我想了解这一切..
猜你喜欢
  • 2019-09-06
  • 2013-03-14
  • 1970-01-01
  • 2015-03-22
  • 2016-11-30
  • 1970-01-01
  • 1970-01-01
  • 2014-10-30
  • 1970-01-01
相关资源
最近更新 更多