Codeigniter의 url에서 "index.php"를 제거하려고합니다. 베이스 URL에서 index.php를 제거하는 방법을 알고 싶습니다. example.com/controller.codeigniter remove index.php form url
하지만 난 CodeIgniter의 다른 프로젝트에 가지고 있기 때문에 example.com/folder/index.php/controller
같은 하위 폴더에 "index.php에"를 제거하는 방법을 모르겠어요. 그래서 두 번째 프로젝트는 하위 폴더에 업로드했습니다.
htaccess로
#original
#RewriteEngine on
#RewriteCond $1 !^(index\.php|images|robots\.txt)
#RewriteRule ^(.*)$ index.php/$1 [L]
#modify
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
RewriteBase/
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
기본 URL에 대한 위의 프로그램. 그래서이 프로그램에서 바뀌게 될 것은 하위 폴더에서 작동합니다.
고마워 ... 작동 중 – joy
환영합니다 .... – Gagan