CI 묻고 답하기

제목 iis8 + php5 에서 구동하기
카테고리 CI 2, 3
글쓴이 goodsi 작성시각 2019/07/15 17:42:12
댓글 : 1 추천 : 0 스크랩 : 0 조회수 : 10647   RSS

안녕하세요 

win7+iis7+php7 에서 코드이그나이터를 실행하기 위해  URL재작성 에서 

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

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

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

이렇게 해서 구현이 되었습니다.

그런데,  win2012server+iis8+php5.* 에서도 위와 같이 하면 될까요? 

리얼서버라 아직 해보진 않았습니다.

 

 

 

 

 

 

 

 다음글 uri route 질문드려요 (1)
 이전글 관리자단 비로그인시 로그인 페이지 이동 시키는 방법 좀... (4)

댓글

lovelywook / 2019/07/15 17:55:49 / 추천 0

iis에 윈도우용 php를 설치하여 이용하시면 web.config로 셋팅하셔야합니다.

iis에서 URL 재작성으로 설정하시면 자동으로 만들어집니다.

 

​<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="CodeIgniter" patternSyntax="Wildcard">
                    <match url="*" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>