기본 콘텐츠로 건너뛰기

php codeigniter index.php 404 not found 오류일때 수정하기

php codeigniter index.php 404 not found 오류일때 수정하기

포도청 스파이~!!

변사또 2020. 2. 20. 18:25

httpd.conf 파일을 vi 에디터로 열어서 보면 초중반 쯤에

AllowOverride none

Require all denied

이라는 내용이 나오는데 위에걸

AllowOverride All

Require all denied

none -> All 로 수정해주고

또 아래로 스크롤 하다가 보면

AllowOverride None # Allow open access: Require all granted

이렇게 되어있는 걸 아래처럼

AllowOverride All # Allow open access: Require all granted

none -> All 로 수정해주고

마지막으로 스크롤 하고 아래로 내려가다보면

# Further relax access to the default document root: # # 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

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

# # Controls who can get stuff from this server. # Require all granted

똑같이

AllowOverride None -> 부분을 AllowOverride All로 수정해주고

컨트롤 + C

:wq 로 저장하고 종료하고

아파치를 재실행 하면 제대로 요청한 페이지가 출력된 것을 볼 수 있을 것입니다.

혹시 이렇게 했는데도 처리가 안된다면 ..htaccess 파일을 수정해야 하는데

index.php 가 있는 루트 폴더에 .htaccess 파일을 생성하고 내용은

< IfModule mod_rewrite.c >

RewriteEngine On

RewriteBase /

RewriteCond $1 !^(index\.php|images|captcha|data|include|uploads|robots\.txt)

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.php/$1 [L]

이렇게 저장하고 새로고침 하면 페이지가 뜰 것 입니다.

화이팅!

from http://satto.tistory.com/671 by ccl(A) rewrite - 2020-03-06 09:20:42

댓글

이 블로그의 인기 게시물

[PHP] 코드이그니터 - 파일업로드 구현

[PHP] 코드이그니터 - 파일업로드 구현 파일 업로드 이번에 PHP 프레임워크인 코드 이그니터(Codeigniter)를 사용하여 홈페이지를 만드는데 사용한 이미지 업로드용 코드 입니다. upload 라이브러리를 사용하고 app~ 와 같은 위치에 upload 폴더를 만드고 다음 코드를 사용한다음 ajax 로 호출하여 파일을 업로드 합니다. function index() { // Upload 설정 $config['upload_path'] = './upload/'; $config[\'allowed_types\'] = 'gif|jpg|png'; $config['max_size'] = 100; // 100k $config['max_width'] = 1024; $config['max_height'] = 768; $this->load->library('upload', $config); $data = array(); if (! $this->upload->do_upload("service_image")) { $error = array('error' => $this->upload->display_errors()); } else { //$data = array('upload_data' => $this->upload->data()); $this->output->set_output("./upload/".$this->upload->data('file_name')); } } jquery 를 이용한 파일 업로드 호출 코드 function upload() { var datas, xhr; datas = new FormData(); datas.append( 'service_image', $( ...

2017년 1월 스타트업에서 구인할때 주로 원하는 개발 기술

2017년 1월 스타트업에서 구인할때 주로 원하는 개발 기술 php mysql linux android git kotlin gcm/fcm python mssql mongodb amazon aws ios objective-c swift github python c++ django python postgresql amazon aws html5/css3/javascript android java mysql python c++ c# java aws cloud-server dbms node.js postgresql redis nginx react.js hapi.js amazon aws restful-api angularJS jQuery html5/css3/javascript android firebase custom ui component restful-api asp.net c# html css javascript bootstrap angularjs node.js php mongodb redis 프론트엔드 주요 기술 javascript jquery ajax angularjs wbesocket html5/css3/javascript android ios java xcode node.js coffeescript mysql amazon ec2 amazon es3 android ios node.js php python java ios php mysql apache python android redis node.js jquery msa node.js java restful-api linux nosql golang redis nginx ...

이클립스 코드이그나이터 연동 ( eclipse codeigniter )

이클립스 코드이그나이터 연동 ( eclipse codeigniter ) https://ellislab.com/codeigniter/user-guide/installation/downloads.html 위의 사이트에서 코드이그나이터를 다운 받는다. 다운받은 압축 파일을 풀어 준다. 이클립스에서 php 프로젝트를 생성한 공간에 코드이그나이터 압축파일을 복사 붙여넣기 해준다. 위와 같은 화면이 나오면 정상적으로 연동이 된 것 입니다. from http://nahosung.tistory.com/22 by ccl(A) rewrite - 2020-03-06 16:20:55