Godaddy上找不到CodeIgniter 404页面 [英] CodeIgniter 404 Page Not Found On Godaddy

查看:163
本文介绍了Godaddy上找不到CodeIgniter 404页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有网站内置的CodeIgniter它的工作罚款localhost,但当我上传在线它是给404页面找不到。我使用godaddy托管Linux服务器。



我尝试在同一路径上放置一个文本文件,工作正常是检查我正在访问正确的路径



我也无法访问index.php。如果我打开www.mydomain.com/index.php,它会给出404页面未找到



家庭控制器代码here carrentalschandigarh.com/file.txt
我的.htaccess文件代码如下

 < IfModule mod_rewrite.c> 
选项+ FollowSymLinks -MultiViews -Indexes
RewriteEngine On
RewriteBase /

RewriteCond%{REQUEST_URI} ^ system。*
RewriteRule ^(。*) $ /index.php?/$1 [L]

RewriteCond%{REQUEST_URI} ^ application。*
RewriteRule ^(。*)$ /index.php?/$1 [L]

RewriteCond%{REQUEST_FILENAME}!-f
RewriteCond%{REQUEST_FILENAME}!-d
RewriteRule ^(。*)$ index.php?/ $ 1 [L]
< / IfModule>

我的config.php代码

 <?php 
defined('BASEPATH')OR exit('不允许直接脚本访问);

/ *
| ----------------------------------- ---------------------------------------
|基本网址URL
| ------------------------------------------ --------------------------------
|
|您的CodeIgniter根的URL。通常这将是您的基本URL,
|带有斜杠:
|
| http://example.com/
|
|如果这没有设置,CodeIgniter将尝试猜测协议,域
|和路径。但是,您应该始终配置此
|明确并且从不依赖于自动猜测,特别是在生产中
|环境。
|
* /
$ config ['base_url'] ='';

/ *
| ----------------------------------- ---------------------------------------
|索引文件
| ------------------------------------------- -------------------------------
|
|通常这将是您的index.php文件,除非您已将其重命名为
|别的。如果你使用mod_rewrite删除页面设置这个
|变量,使其为空白。
|
* /
$ config ['index_page'] ='';

/ *
| ----------------------------------- ---------------------------------------
| URI PROTOCOL
| ------------------------------------------- -------------------------------
|
|此项目确定应使用哪个服务器全局来检索
| URI字符串。默认设置REQUEST_URI适用于大多数服务器。
|如果你的链接似乎不工作,尝试其他美味的风味:
|
| 'REQUEST_URI'使用$ _SERVER ['REQUEST_URI']
| 'QUERY_STRING'使用$ _SERVER ['QUERY_STRING']
| 'PATH_INFO'使用$ _SERVER ['PATH_INFO']
|
|警告:如果将此设置为PATH_INFO,URI将始终进行URL解码!
* /
$ config ['uri_protocol'] ='REQUEST_URI';

/ *
| ----------------------------------- ---------------------------------------
| URL后缀
| ------------------------------------------- -------------------------------
|
|此选项允许您为CodeIgniter生成的所有URL添加后缀。
|有关更多信息,请参阅用户指南:
|
| http://codeigniter.com/user_guide/general/urls.html
* /
$ config ['url_suffix'] ='';

/ *
| ----------------------------------- ---------------------------------------
|默认语言
| ------------------------------------------- -------------------------------
|
|这决定了应该使用哪一组语言文件。确保
|有一个可用的翻译如果你打算使用其他
|比英语。
|
* /
$ config ['language'] ='english';

/ *
| ----------------------------------- ---------------------------------------
|默认字符集
| ------------------------------------------ --------------------------------
|
|这决定了默认情况下在各种方法
|中使用的字符集需要提供字符集。
|
|有关支持的字符集的列表,请参阅http://php.net/htmlspecialchars。
|
* /
$ config ['charset'] ='UTF-8';

/ *
| ----------------------------------- ---------------------------------------
|启用/禁用系统挂钩
| ---------------------------------------- ----------------------------------
|
|如果你想使用'hooks'功能,你必须通过
|启用它将此变量设置为TRUE(布尔)。有关详细信息,请参阅用户指南。
|
* /
$ config ['enable_hooks'] = FALSE;

/ *
| ----------------------------------- ---------------------------------------
|类扩展名前缀
| ------------------------------------------ --------------------------------
|
|此项允许您在扩展
|时设置文件名/类名前缀本地库。有关更多信息,请参阅用户指南:
|
| http://codeigniter.com/user_guide/general/core_classes.html
| http://codeigniter.com/user_guide/general/creating_libraries.html
|
* /
$ config ['subclass_prefix'] ='MY_';

/ *
| ----------------------------------- ---------------------------------------
| Composer自动加载
| ----------------------------------------- ---------------------------------
|
|启用此设置将告诉CodeIgniter查找Composer
| application / vendor / autoload.php中的软件包自动加载器脚本。
|
| $ config ['composer_autoload'] = TRUE;
|
|或者如果你的供应商/目录位于其他地方,你
|可以选择设置一个特定的路径:
|
| $ config ['composer_autoload'] ='/path/to/vendor/autoload.php';
|
|有关Composer的更多信息,请访问http://getcomposer.org/
|
|注意:这不会禁用或覆盖CodeIgniter特定的
| autoloading(application / config / autoload.php)
* /
$ config ['composer_autoload'] = FALSE;

/ *
| ----------------------------------- ---------------------------------------
|允许的网址字符
| ------------------------------------------ --------------------------------
|
|这样,您可以指定网址中允许使用哪些字符。
|当有人尝试提交包含不允许的字符的网址时,他们将
|获取警告消息。
|
|作为一项安全措施,强烈建议您将URL限制为
|尽可能少的字符。默认情况下,只允许这些:a-z 0-9〜%。:_-
|
|留空以允许所有字符 - 但仅当您是疯了。
|
|配置的值实际上是正则表达式字符组
|它将执行为:! preg_match('/ ^ [< permitted_uri_chars>] + $ / i
|
|除非您完全了解重复次数,否则请勿更改!
|
* /
$ config ['permitted_uri_chars'] ='az 0-9〜%。:_ \-';

/ *
| ---------- -------------------------------------------------- --------------
|启用查询字符串
| ----------------------- -------------------------------------------------- -
|
|默认情况下CodeIgniter使用基于搜索引擎友好型段的URL:
| example.com/who/what/where/
|
|默认CodeIgniter允许访问$ _GET数组如果对于某些
|原因你想禁用它,将'allow_get_array'设置为FALSE
|
|您可以选择启用基于标准查询字符串网址:
| example.com?who=me&what=something&where=here
|
|选项有:TRUE或FALSE(boolean)
|
|其他项让你设置查询字符串'words'将
|调用你的控制器及其功能:
| example.com/index.php?c=controller&m=function
|
|请注意,当
|时,某些帮助程序将无法正常工作此功能已启用,因为CodeIgniter主要设计为
|使用基于细分的网址。
|
* /
$ config ['allow_get_array'] = TRUE;
$ config ['enable_query_strings'] = FALSE;
$ config ['controller_trigger'] ='c';
$ config ['function_trigger'] ='m';
$ config ['directory_trigger'] ='d';

/ *
| ----------------------------------- ---------------------------------------
|错误记录阈值
| ------------------------------------------ --------------------------------
|
|您可以通过将阈值设置为零来启用错误日志记录。
|阈值确定什么被记录。阈值选项是:
|
| 0 =禁用日志记录,错误日志记录TURNED OFF
| 1 =错误消息(包括PHP错误)
| 2 =调试消息
| 3 =参考消息
| 4 =所有消息
|
|您还可以传递具有阈值级别的数组,以显示单个错误类型
|
| array(2)=调试消息,没有错误消息
|
|对于活动网站,您通常只会启用错误(1)记录,否则
|您的日志文件将填满非常快。
|
* /
$ config ['log_threshold'] = 0;

/ *
| ----------------------------------- ---------------------------------------
|错误记录目录路径
| ----------------------------------------- ---------------------------------
|
|除非你想设置默认的
|以外的东西,否则留下这个空格application / logs /目录。使用带有尾部斜杠的完整服务器路径。
|
* /
$ config ['log_path'] ='';

/ *
| ----------------------------------- ---------------------------------------
|日志文件扩展名
| ------------------------------------------ --------------------------------
|
|日志文件的默认文件扩展名。默认的php允许
|通过基本脚本保护日志文件,当它们被存储
|在可公开访问的目录下。
|
|注意:留为空白将默认为php。
|
* /
$ config ['log_file_extension'] ='';

/ *
| ----------------------------------- ---------------------------------------
|日志文件权限
| ------------------------------------------ --------------------------------
|
|要应用于新创建的日志文件的文件系统权限。
|
|重要:这必须是一个整数(没有引号),你必须使用八进制
|整数符号(即0700,0644等)
* /
$ config ['log_file_permissions'] = 0644;

/ *
| ----------------------------------- ---------------------------------------
|日志的日期格式
| ----------------------------------------- ---------------------------------
|
|每个记录的项目都有一个相关的日期。您可以使用PHP date
|代码设置您自己的日期格式
|
* /
$ config ['log_date_format'] ='Y-m-d H:i:s';

/ *
| ----------------------------------- ---------------------------------------
|错误视图目录路径
| ----------------------------------------- ---------------------------------
|
|除非你想设置默认的
|以外的东西,否则留下这个空格application / views / errors /目录。使用带有尾部斜杠的完整服务器路径。
|
* /
$ config ['error_views_path'] ='';

/ *
| ----------------------------------- ---------------------------------------
|缓存目录路径
| ------------------------------------------ --------------------------------
|
|除非你想设置默认的
|以外的东西,否则留下这个空格应用程序/缓存/目录。使用带有尾部斜杠的完整服务器路径。
|
* /
$ config ['cache_path'] ='';

/ *
| ----------------------------------- ---------------------------------------
|缓存包含查询字符串
| ----------------------------------------- ---------------------------------
|
|在生成
|时是否考虑URL查询字符串输出缓存文件。有效选项是:
|
| FALSE = Disabled
| TRUE =启用,将所有查询参数考虑在内。
|请注意,这可能会导致许多缓存
|一遍又一遍地为同一页生成的文件。
| array('q')=启用,但只考虑指定的列表
|的查询参数。
|
* /
$ config ['cache_query_string'] = FALSE;

/ *
| ----------------------------------- ---------------------------------------
|加密密钥
| ------------------------------------------- -------------------------------
|
|如果使用加密类,则必须设置加密密钥。
|有关详细信息,请参阅用户指南。
|
| http://codeigniter.com/user_guide/libraries/encryption.html
|
* /
$ config ['encryption_key'] ='partyusalife-7890';

/ *
| ----------------------------------- ---------------------------------------
|会话变量
| ------------------------------------------- -------------------------------
|
| 'sess_driver'
|
|要使用的存储驱动程序:文件,数据库,redis,memcached
|
| 'sess_cookie_name'
|
|会话cookie名称,必须只包含[0-9a-z_-]字符
|
| 'sess_expiration'
|
|您希望会话持续的SECONDS数。
|设置为0(零)表示浏览器关闭时过期。
|
| 'sess_save_path'
|
|保存会话的位置,驱动程序相关。
|
|对于'files'驱动程序,它是一个到可写目录的路径。
|警告:仅支持绝对路径!
|
|对于'数据库'驱动程序,它是一个表名。
|请阅读其他会话驱动程序格式的手册。
|
|重要信息:您需要设置有效的保存路径!
|
| 'sess_match_ip'
|
|读取会话数据时是否匹配用户的IP地址。
|
| 'sess_time_to_update'
|
| CI重新生成会话ID之间的秒数。
|
| 'sess_regenerate_destroy'
|
|是否销毁与旧会话ID
|相关联的会话数据当自动重新生成会话ID时。当设置为FALSE时,数据
|将后来被垃圾回收器删除。
|
|其他会话Cookie设置与应用程序的其余部分(
|)共享除了'cookie_prefix'和'cookie_httponly',这里忽略。
|
* /
$ config ['sess_driver'] ='files';
$ config ['sess_cookie_name'] ='ci_session';
$ config ['sess_expiration'] = 7200;
$ config ['sess_save_path'] = NULL;
$ config ['sess_match_ip'] = FALSE;
$ config ['sess_time_to_update'] = 300;
$ config ['sess_regenerate_destroy'] = FALSE;

/ *
| ----------------------------------- ---------------------------------------
| Cookie相关变量
| ------------------------------------------ --------------------------------
|
| 'cookie_prefix'=设置cookie名称前缀,如果你需要避免冲突
| 'cookie_domain'=设置为.your-domain.com网站范围的Cookie
| 'cookie_path'=通常为正斜杠
| 'cookie_secure'= Cookie只有在存在安全的HTTPS连接时才会被设置。
| 'cookie_httponly'= Cookie只能通过HTTP(S)(无javascript)
|访问
|注意:这些设置(cookie_prefix和
|cookie_httponly除外)也会影响会话。
|
* /
$ config ['cookie_prefix'] ='';
$ config ['cookie_domain'] ='';
$ config ['cookie_path'] ='/';
$ config ['cookie_secure'] = FALSE;
$ config ['cookie_httponly'] = FALSE;

/ *
| ----------------------------------- ---------------------------------------
|标准化换行符
| ------------------------------------------- -------------------------------
|
|确定是否标准化输入数据中的换行符
|意义用PHP_EOL值替换\r\\\
,\r,\\\
出现。
|
|这对于基于UNIX的操作系统(
|)之间的可移植性特别有用(通常为\\\
)和Windows(\r\\\
)。
|
* /
$ config ['standardize_newlines'] = FALSE;

/ *
| ----------------------------------- ---------------------------------------
|全局XSS过滤
| ------------------------------------------ --------------------------------
|
|确定在GET,POST或
|时XSS过滤器是否始终处于活动状态遇到COOKIE数据
|
|警告:此功能为DEPRECATED,目前只有
|用于向后兼容目的!
|
* /
$ config ['global_xss_filtering'] = TRUE;

/ *
| ----------------------------------- ---------------------------------------
|跨站点请求伪造
| ----------------------------------------- ---------------------------------
|启用要设置的CSRF Coo​​kie令牌。当设置为TRUE时,令牌将为
|检查提交的表单。如果你接受用户数据,强烈
|建议启用CSRF保护。
|
| 'csrf_token_name'=令牌名称
| 'csrf_cookie_name'= Cookie名称
| 'csrf_expire'=令牌应该到期的秒数。
| 'csrf_regenerate'=每次提交时重新生成令牌
| 'csrf_exclude_uris'=忽略CSRF检查的URI数组
* /
$ config ['csrf_protection'] = FALSE;
$ config ['csrf_token_name'] ='csrf_test_name';
$ config ['csrf_cookie_name'] ='csrf_cookie_name';
$ config ['csrf_expire'] = 7200;
$ config ['csrf_regenerate'] = TRUE;
$ config ['csrf_exclude_uris'] = array();

/ *
| ----------------------------------- ---------------------------------------
|输出压缩
| ------------------------------------------- -------------------------------
|
|启用Gzip输出压缩以加快页面加载速度。启用时,
|输出类将测试您的服务器是否支持Gzip。
|即使它,但是,并不是所有的浏览器都支持压缩
|因此只有在您合理地确保您的访问者可以处理它时才启用。
|
|仅当在php.ini中关闭zlib.output_compression时才使用。
|请不要与httpd级输出压缩一起使用。
|
|非常重要:如果您在压缩时启用了空白页面,则
|意味着您过早地将某些内容输出到浏览器。它可以
|甚至在你的一个脚本的结尾处有一行空格。对于
|压缩工作,在输出缓冲区调用
|之前不能发送任何内容由输出类。不要'echo'任何值,启用压缩。
|
* /
$ config ['compress_output'] = FALSE;

/ *
| ----------------------------------- ---------------------------------------
|主时间参考
| ------------------------------------------ --------------------------------
|
|选项是本地或任何PHP支持的时区。此偏好告诉
|系统是否使用您的服务器的本地时间作为主'现在'
|引用,或将其转换为配置的一个时区。参见'date
|帮助页面,以获取有关日期处理的信息。
|
* /
$ config ['time_reference'] ='local';

/ *
| ----------------------------------- ---------------------------------------
|重写PHP短标签
| ----------------------------------------- ---------------------------------
|
|如果您的PHP安装没有启用短标记支持CI
|可以实时重写标记,使您能够使用语法
|在您的视图文件。选项为TRUE或FALSE(布尔)
|
|注意:您需要启用eval()才能使其工作。
|
* /
$ config ['rewrite_short_tags'] = FALSE;

/ *
| ----------------------------------- ---------------------------------------
|反向代理IP
| ------------------------------------------ --------------------------------
|
|如果您的服务器位于逆向代理之后,则必须将代理
|列入白名单CodeIgniter应该信任报头的IP地址,例如
| HTTP_X_FORWARDED_FOR和HTTP_CLIENT_IP,以便正确标识
|访问者的IP地址。
|
|您可以使用数组或逗号分隔的代理地址列表
|以及指定整个子网。这里有几个例子:
|
|逗号分隔:'10 .0.1.200,192.168.5.0 / 24'
| array:array('10 .0.1.200','192.168.5.0/24')
* /
$ config ['proxy_ips'] ='';

这不是重复的
CodeIgniter:404在实时服务器上找不到页面
因为它甚至不加载index.php


b b b b b b p>例如: Home.php 和内部控制器首页



和您网址内的锚定标签全部设置为简单 首页 ,而不是 首页


I am having website built in CodeIgniter Its working fine on localhost but when i uploaded it online It is giving 404 Page Not Found . I am using godaddy Hosting Linux Server .

I tried placing a text file on same path it works fine it was to check i am accessing correct path

I am also unable to access index.php . If I opne www.mydomain.com/index.php it gives 404 Page Not Found

home controller code here carrentalschandigarh.com/file.txt My .htaccess file code is as below

<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule> 

Code Of My config.php

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|   http://example.com/
|
| If this is not set then CodeIgniter will try guess the protocol, domain
| and path to your installation. However, you should always configure this
| explicitly and never rely on auto-guessing, especially in production
| environments.
|
*/
$config['base_url'] = '';

/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';

/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of 'REQUEST_URI' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'REQUEST_URI'    Uses $_SERVER['REQUEST_URI']
| 'QUERY_STRING'   Uses $_SERVER['QUERY_STRING']
| 'PATH_INFO'      Uses $_SERVER['PATH_INFO']
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
$config['uri_protocol'] = 'REQUEST_URI';

/*
|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
| For more information please see the user guide:
|
| http://codeigniter.com/user_guide/general/urls.html
*/
$config['url_suffix'] = '';

/*
|--------------------------------------------------------------------------
| Default Language
|--------------------------------------------------------------------------
|
| This determines which set of language files should be used. Make sure
| there is an available translation if you intend to use something other
| than english.
|
*/
$config['language'] = 'english';

/*
|--------------------------------------------------------------------------
| Default Character Set
|--------------------------------------------------------------------------
|
| This determines which character set is used by default in various methods
| that require a character set to be provided.
|
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
*/
$config['charset'] = 'UTF-8';

/*
|--------------------------------------------------------------------------
| Enable/Disable System Hooks
|--------------------------------------------------------------------------
|
| If you would like to use the 'hooks' feature you must enable it by
| setting this variable to TRUE (boolean).  See the user guide for details.
|
*/
$config['enable_hooks'] = FALSE;

/*
|--------------------------------------------------------------------------
| Class Extension Prefix
|--------------------------------------------------------------------------
|
| This item allows you to set the filename/classname prefix when extending
| native libraries.  For more information please see the user guide:
|
| http://codeigniter.com/user_guide/general/core_classes.html
| http://codeigniter.com/user_guide/general/creating_libraries.html
|
*/
$config['subclass_prefix'] = 'MY_';

/*
|--------------------------------------------------------------------------
| Composer auto-loading
|--------------------------------------------------------------------------
|
| Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.
|
|   $config['composer_autoload'] = TRUE;
|
| Or if you have your vendor/ directory located somewhere else, you
| can opt to set a specific path as well:
|
|   $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| For more information about Composer, please visit http://getcomposer.org/
|
| Note: This will NOT disable or override the CodeIgniter-specific
|   autoloading (application/config/autoload.php)
*/
$config['composer_autoload'] = FALSE;

/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify which characters are permitted within your URLs.
| When someone tries to submit a URL with disallowed characters they will
| get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible.  By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| The configured value is actually a regular expression character group
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| example.com/who/what/where/
|
| By default CodeIgniter enables access to the $_GET array.  If for some
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
| You can optionally enable standard query string based URLs:
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The other items let you set the query string 'words' that will
| invoke your controllers and its functions:
| example.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd';

/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
|   0 = Disables logging, Error logging TURNED OFF
|   1 = Error Messages (including PHP errors)
|   2 = Debug Messages
|   3 = Informational Messages
|   4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
|   array(2) = Debug Messages, without Error Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 0;

/*
|--------------------------------------------------------------------------
| Error Logging Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/logs/ directory. Use a full server path with trailing slash.
|
*/
$config['log_path'] = '';

/*
|--------------------------------------------------------------------------
| Log File Extension
|--------------------------------------------------------------------------
|
| The default filename extension for log files. The default 'php' allows for
| protecting the log files via basic scripting, when they are to be stored
| under a publicly accessible directory.
|
| Note: Leaving it blank will default to 'php'.
|
*/
$config['log_file_extension'] = '';

/*
|--------------------------------------------------------------------------
| Log File Permissions
|--------------------------------------------------------------------------
|
| The file system permissions to be applied on newly created log files.
|
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
|            integer notation (i.e. 0700, 0644, etc.)
*/
$config['log_file_permissions'] = 0644;

/*
|--------------------------------------------------------------------------
| Date Format for Logs
|--------------------------------------------------------------------------
|
| Each item that is logged has an associated date. You can use PHP date
| codes to set your own date formatting
|
*/
$config['log_date_format'] = 'Y-m-d H:i:s';

/*
|--------------------------------------------------------------------------
| Error Views Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/views/errors/ directory.  Use a full server path with trailing slash.
|
*/
$config['error_views_path'] = '';

/*
|--------------------------------------------------------------------------
| Cache Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/cache/ directory.  Use a full server path with trailing slash.
|
*/
$config['cache_path'] = '';

/*
|--------------------------------------------------------------------------
| Cache Include Query String
|--------------------------------------------------------------------------
|
| Whether to take the URL query string into consideration when generating
| output cache files. Valid options are:
|
|   FALSE      = Disabled
|   TRUE       = Enabled, take all query parameters into account.
|                Please be aware that this may result in numerous cache
|                files generated for the same page over and over again.
|   array('q') = Enabled, but only take into account the specified list
|                of query parameters.
|
*/
$config['cache_query_string'] = FALSE;

/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class, you must set an encryption key.
| See the user guide for more info.
|
| http://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config['encryption_key'] = 'partyusalife-7890';

/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_driver'
|
|   The storage driver to use: files, database, redis, memcached
|
| 'sess_cookie_name'
|
|   The session cookie name, must contain only [0-9a-z_-] characters
|
| 'sess_expiration'
|
|   The number of SECONDS you want the session to last.
|   Setting to 0 (zero) means expire when the browser is closed.
|
| 'sess_save_path'
|
|   The location to save sessions to, driver dependent.
|
|   For the 'files' driver, it's a path to a writable directory.
|   WARNING: Only absolute paths are supported!
|
|   For the 'database' driver, it's a table name.
|   Please read up the manual for the format with other session drivers.
|
|   IMPORTANT: You are REQUIRED to set a valid save path!
|
| 'sess_match_ip'
|
|   Whether to match the user's IP address when reading the session data.
|
| 'sess_time_to_update'
|
|   How many seconds between CI regenerating the session ID.
|
| 'sess_regenerate_destroy'
|
|   Whether to destroy session data associated with the old session ID
|   when auto-regenerating the session ID. When set to FALSE, the data
|   will be later deleted by the garbage collector.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix'   = Set a cookie name prefix if you need to avoid collisions
| 'cookie_domain'   = Set to .your-domain.com for site-wide cookies
| 'cookie_path'     = Typically will be a forward slash
| 'cookie_secure'   = Cookie will only be set if a secure HTTPS connection exists.
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
    | Note: These settings (with the exception of 'cookie_prefix' and
    |       'cookie_httponly') will also affect sessions.
    |
    */
    $config['cookie_prefix']    = '';
    $config['cookie_domain']    = '';
    $config['cookie_path']      = '/';
    $config['cookie_secure']    = FALSE;
    $config['cookie_httponly']  = FALSE;

    /*
    |--------------------------------------------------------------------------
    | Standardize newlines
    |--------------------------------------------------------------------------
    |
    | Determines whether to standardize newline characters in input data,
    | meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
    |
    | This is particularly useful for portability between UNIX-based OSes,
    | (usually \n) and Windows (\r\n).
    |
    */
    $config['standardize_newlines'] = FALSE;

    /*
    |--------------------------------------------------------------------------
    | Global XSS Filtering
    |--------------------------------------------------------------------------
    |
    | Determines whether the XSS filter is always active when GET, POST or
    | COOKIE data is encountered
    |
    | WARNING: This feature is DEPRECATED and currently available only
    |          for backwards compatibility purposes!
    |
    */
    $config['global_xss_filtering'] = TRUE;

    /*
    |--------------------------------------------------------------------------
    | Cross Site Request Forgery
    |--------------------------------------------------------------------------
    | Enables a CSRF cookie token to be set. When set to TRUE, token will be
    | checked on a submitted form. If you are accepting user data, it is strongly
    | recommended CSRF protection be enabled.
        |
    | 'csrf_token_name' = The token name
    | 'csrf_cookie_name' = The cookie name
    | 'csrf_expire' = The number in seconds the token should expire.
    | 'csrf_regenerate' = Regenerate token on every submission
    | 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
    */
    $config['csrf_protection'] = FALSE;
    $config['csrf_token_name'] = 'csrf_test_name';
    $config['csrf_cookie_name'] = 'csrf_cookie_name';
    $config['csrf_expire'] = 7200;
    $config['csrf_regenerate'] = TRUE;
    $config['csrf_exclude_uris'] = array();

    /*
    |--------------------------------------------------------------------------
    | Output Compression
    |--------------------------------------------------------------------------
    |
    | Enables Gzip output compression for faster page loads.  When enabled,
    | the output class will test whether your server supports Gzip.
    | Even if it does, however, not all browsers support compression
    | so enable only if you are reasonably sure your visitors can handle it.
    |
    | Only used if zlib.output_compression is turned off in your php.ini.
    | Please do not use it together with httpd-level output compression.
    |
    | VERY IMPORTANT:  If you are getting a blank page when compression is enabled             it
    | means you are prematurely outputting something to your browser. It could
    | even be a line of whitespace at the end of one of your scripts.  For
    | compression to work, nothing can be sent before the output buffer is called
    | by the output class.  Do not 'echo' any values with compression enabled.
    |
    */
    $config['compress_output'] = FALSE;

    /*
    |--------------------------------------------------------------------------
    | Master Time Reference
    |--------------------------------------------------------------------------
    |
    | Options are 'local' or any PHP supported timezone. This preference tells
    | the system whether to use your server's local time as the master 'now'
    | reference, or convert it to the configured one timezone. See the 'date
    | helper' page of the user guide for information regarding date handling.
    |
    */
    $config['time_reference'] = 'local';

    /*
    |--------------------------------------------------------------------------
    | Rewrite PHP Short Tags
    |--------------------------------------------------------------------------
    |
    | If your PHP installation does not have short tag support enabled CI
    | can rewrite the tags on-the-fly, enabling you to utilize that syntax
    | in your view files.  Options are TRUE or FALSE (boolean)
    |
    | Note: You need to have eval() enabled for this to work.
    |
    */
    $config['rewrite_short_tags'] = FALSE;

    /*
    |--------------------------------------------------------------------------
    | Reverse Proxy IPs
    |--------------------------------------------------------------------------
    |
    | If your server is behind a reverse proxy, you must whitelist the proxy
    | IP addresses from which CodeIgniter should trust headers such as
    | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
    | the visitor's IP address.
    |
    | You can use both an array or a comma-separated list of proxy addresses,
    | as well as specifying whole subnets. Here are a few examples:
    |
    | Comma-separated:  '10.0.1.200,192.168.5.0/24'
    | Array:        array('10.0.1.200', '192.168.5.0/24')
    */
    $config['proxy_ips'] = '';

It is not duplicate of this CodeIgniter: 404 Page Not Found on Live Server Because it is not even loading index.php in starting

解决方案

Change your all file names caps and controller name as simple

Ex : Home.php and inside controller home

and inside your URL anchor tags set all to simple home instead of Home

这篇关于Godaddy上找不到CodeIgniter 404页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆