0
표시 규칙을 다음과 같이 설정했습니다. avatar.jpg (/images/avatar.jpg
)을 (를) 찾을 수 없습니다. 나는 IIS 관리자을 사용하여 .htaccess
을 web.config
로 변환했습니다. 여기 Azure php web app web.config가 작동하지 않습니다.
RewriteEngine On
RewriteCond %{REQUEST_URI} \.(jpg)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*$ /images/user-default.png [L]
변환 된 web.config 파일 (
/uploads/web.config
)이며,
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 3" stopProcessing="true">
<match url=".*$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="\.(jpg)$" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="/images/avatar.png" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
입니다 존재하지 않는 이미지에 대해 오류를 발견했습니다.