CodeIgniter 설치 문제
-
05-09-2019 - |
문제
나는 데 문제가 동작에 shared hosting 계정이다.URL 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"
그리고 그것이 그것을 고치는 지 확인하십시오
또한 클래스 컨트롤러 이름이 파일 이름과 동일합니까?
filename = test.php
class Test ...
다른 팁
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 on RewriteBase/testci RewriteCond%{REQUEST_URI}^시스템입니다.* RewriteRule^(.)$/index.php/$1[L] RewriteCond%{REQUEST_FILENAME}!-f RewriteCond%{REQUEST_FILENAME}!-d RewriteRule^(.)$index.php/$1[L] RewriteCond$1!^(index.php/images/captcha/css/js/robots.txt) addType text/css.css