반응형
iis7의 워드프레스 URL에서 index.php를 제거합니다.
url에서 index.php를 삭제하고 싶습니다.워드프레스와 iis7을 사용하고 있습니다.어떻게 하면 좋을까요?
이 web.config 사용
(web.config는 Apache Web서버의 .htaccess 파일과 동등한 IIS입니다.루트 폴더에서 찾을 수 있습니다.존재하지 않는 경우 작성해야 합니다.)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<!-- Set the default document -->
<files>
<remove value="index.php" />
<add value="index.php" />
</files>
</defaultDocument>
<httpErrors errorMode="Detailed"/>
<rewrite>
<rules>
<rule name="wordpress" 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>
그런 다음 permalinks 페이지에서 "Custom Structure"를 설정하고 값을 지정합니다./%postname%/
IIS 버전에 특화된 URL Rewrite 모듈이 설치되어 있어야 이 기능이 작동합니다(@Spikolynn의 코멘트 덕분에).
Windows Azure 의 Web 사이트를 사용하고 있는 경우, 다른 매우 빠른 해결책은,Microsoft WebMatrix
웹 사이트에 로그인하여 이 기사에서 지적한 대로 web.config 파일을 만듭니다.이제 해결됐네요.를 인스톨 할 필요는 없습니다.URL Rewrite extension
아니면 직접 그런 거라도요MS Webmatrix는 문제를 쉽게 해결할 수 있을 것 같습니다.
언급URL : https://stackoverflow.com/questions/12106064/remove-index-php-from-wordpress-urls-in-iis7
반응형
'it-source' 카테고리의 다른 글
numpy 유형을 python으로 변환 (0) | 2023.02.22 |
---|---|
커스텀 포스트 wp_pagnation (0) | 2023.02.22 |
JSON을 소독할 필요가 있습니까? (0) | 2023.02.22 |
헤더에서 워드프레스 피드 URL을 삭제/제거하는 방법 (0) | 2023.02.22 |
속편 - 데이터베이스 결과의 JSON 개체만 반환하려면 어떻게 해야 합니까? (0) | 2023.02.22 |