CI 묻고 답하기

제목 index.php 안보이게 하려고 하는데 자꾸 객체가 없다고 나옵니다..질문수정
글쓴이 손님입장 작성시각 2014/06/23 16:23:42
댓글 : 9 추천 : 0 스크랩 : 0 조회수 : 18852   RSS
안녕하세요 
ci 초보입니다
책사서 잘 보고 있는데요 첨부터 막히네요 ㅠㅠ
로컬에서 xampp 깔고 돌리는데 index.php가 안 없어지네요


  일단 페이지는 이렇게 표시되고요
.htaccess 는 


RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|images|captcha|data|include|js|css|font|uploads|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /todo/index.php/$1 [L]
******
댓글로 알려주신대로 적용했지만 안되서 다시 원복했습니다...
******


아파치는
.
.
.
#Listen 12.34.56.78:80
Listen 8080  *** 8080 포트 변경했습니다
.
.
.
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 8080    *** 8080 포트 변경했습니다

#
# Dynamic Shared Object (DSO) Support
.
.
#LoadModule request_module modules/mod_request.so
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule rewrite_module modules/mod_rewrite.so     ***주석 제거된 상태였습니다
#LoadModule sed_module modules/mod_sed.so
#LoadModule session_module modules/mod_sessio
.
.


    Options FollowSymLinks
    AllowOverride All
#   Order deny,allow
#   Allow from all


#   기존원본
#   AllowOverride none
#   Require all denied
*** 이렇게 수정했습니다
.
.

    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
*** 일단 놔두었습니다
.
.

    AllowOverride All
    Options FollowSymLinks
    Require all granted

#   AllowOverride All
#   Options None
#   Require all granted
*** 변경했습니다
.
.

두서없이 베끼다 보니 스크롤 압박이... ㅠㅠ
읽어 주셔서 감사합니다...
 
 다음글 blank page가 뜨는데 php버전과 상관있나요? (1)
 이전글 포럼소스 main부분 다시한번질문드립니다^^ (2)

댓글

변종원(웅파) / 2014/06/23 18:10:04 / 추천 0
index.php 넣으면 페이지 잘 나오나요?
변종원(웅파) / 2014/06/23 18:12:30 / 추천 0
RewriteRule ^(.*)$ /todo/index.php/$1 [L] -> 이 부분이 틀렸습니다.


RewriteRule ^(.*)$ todo/index.php/$1 [L]
letsgolee / 2014/06/23 18:13:50 / 추천 0
index.php가 있는 경로가 어딘지를 잘 파악해야 합니다. 만일 todo 폴더 안에 있다면 index.php파일이 있는 동일 폴더에 .ataccess 파일을 만들죠? 거기서 RewriteBase /todo/ 이렇게 잡으면 됩니다.
손님입장 / 2014/06/23 20:39:33 / 추천 0
제가 이거 8080포트에다가 맞춰놓고 써보려고 하는데 거기서 문제 생기는 건가요?
xampp를 다시 깔고 웅파님과 렛츠고님이 알려주신 방법으로는 해결이 안되네요 ㅠㅠ
손님입장 / 2014/06/23 20:40:34 / 추천 0
그리고 index.php 붙이면 잘 나옵니다
손님입장 / 2014/06/23 21:15:38 / 추천 0
제 폴더 구조는 이렇습니다
변종원(웅파) / 2014/06/23 22:51:24 / 추천 0
아파치 에러 올려주세요. ^^
letsgolee / 2014/06/23 23:06:17 / 추천 0
제가 쓰는 방법입니다.

1. todo/applicaton/config/config.php 파일을 열어 $config['index_page'] = ''; 로 수정.

2. todo/.ataccess 파일 생성하여 다음 으로 입력
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On

# If your website begins from a folder e.g localhost/my_project then 
# you have to change it to: RewriteBase /my_project/
# If your site begins from the root e.g. example.local/ then
# let it as it is
RewriteBase /todo/

# Protect application and system files from being viewed when the index.php is missing
RewriteCond $1 ^(application|system|private|logs)

# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]

# Allow these directories and files to be displayed directly:
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|public|assets|uploads|statics|css|js|images)

# No rewriting
RewriteRule ^(.*)$ - [PT,L]

# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
</IfModule>



.ataccess 파일은 index.php와 동일 폴더에 있어야 합니다.

 
손님입장 / 2014/06/24 07:12:40 / 추천 0
웅파님!렛츠고님! 감사합니다!
덕분에 잘 해결했습니다!
파일위치가 틀려서 그랬네요 ㅠㅠ
ci설치시에  aplication 폴더 안에 .htaccess 있어서 그냥 사용했는데 그걸 밖으로 빼네니까 바로 되네요 ^^
초보적인 실수였네요~ 에고... 암튼 담에는 안헤메고 잘 할 수 있을 거 같네요~
감사합니다!