我有越来越笨到我的共享托管帐户的工作问题。网址是 http://test.tallgreentree.com 。这不是给我以.php错误,但它的一切显示404页我键入到地址栏。

下面是我的config.php文件的开头。

<?php  if ( ! defined('BASEPATH')) 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/
|
*/
$config['base_url'] = "http://test.tallgreentree.com/";

/*
|--------------------------------------------------------------------------
| 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'] = "index.php";

/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'       Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'     Uses the REQUEST_URI
| 'ORIG_PATH_INFO'  Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol'] = "AUTO";

使用笨与子域时是否有已知的问题?可能是什么造成的?我试过多种配置,但似乎没有为我工作。我应该用我的托管服务提供商检查哪些服务器设置?

感谢大家的时间和帮助。

有帮助吗?

解决方案

变化

$config['uri_protocol'] = "AUTO";

$config['uri_protocol'] = "REQUEST_URI"

和看看能否解决它

也,你有没有类控制器名称相同的文件名?

文件名= test.php的

class Test ...

其他提示

请2个变化config.php文件

第一个是:

   `$config['uri_protocol'] = "AUTO";`

   `$config['uri_protocol'] = "REQUEST_URI"`

第二个是:

    $config['index_page'] = 'index.php';

    $config['index_page'] = 'index.php?';

我这正与“REQUEST_URI”但当时我只能打到我的主页。所有其他环节(控制器)始终刷新到主页。这是一种奇怪的,它显示了正确的URL,但需要你的主页不管你所点击的URL。

任何想法?我有一个.htaccess文件,

RewriteEngine叙述上 RewriteBase / testci 的RewriteCond%{REQUEST_URI} ^系统。* 重写规则^()$ /index.php/$1 [L] 的RewriteCond%{} REQUEST_FILENAME!-f 的RewriteCond%{} REQUEST_FILENAME!-d 重写规则^(。)$的index.php / $ 1 [L] 的RewriteCond $ 1→(index.php文件|图片|验证码| CSS | JS | robots.txt的)! 的addType文本/ CSS的CSS

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top