2016-03-28 18 views
0

Gösteren dizin ve varsayılan html göstermek değil yerel klasöre göz attığımda ve klasördeki herhangi bir dosyaya göz attığımda IAS'de göz atma sırasında .html extensnion'u kaldırmaya çalışıyorum extension.html ile o HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. diyor dosya var olduğunu düşündüm.IIS kaldır .html uzantısı klasör dosyası üzerinde çalışmıyor gözatmak

benim web.config

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
<defaultDocument> 
<files> 
<clear /> 
<add value="index.html" /> 
<add value="Default.htm" /> 
<add value="Default.asp" /> 
<add value="index.htm" /> 
<add value="iisstart.htm" /> 
<add value="default.aspx" /> 
</files> 
</defaultDocument> 
<rewrite> 
<rules> 
<rule name="Hide .html ext"> 
<match url="^(.*)" ignoreCase="true" /> 
<conditions> 
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
<add input="{REQUEST_FILENAME}.html" matchType="IsFile" /> 
</conditions> 
<action type="Rewrite" url="{R:0}.html" /> 
</rule> 
<rule name="Redirecting .html ext" stopProcessing="true"> 
<match url="^(.*).html" /> 
<conditions logicalGrouping="MatchAny"> 
<add input="{URL}" pattern="(.*).html" /> 
</conditions> 
<action type="Redirect" url="{R:1}" /> 
</rule> 
</rules> 
</rewrite> 
</system.webServer> 
</configuration> 

cevap

0

Eğer IIS yüklü URL yeniden özelliği olduğundan emin olun. see the image

o müsait değilse, o zaman, sağ tarafta Get Yeni Web Platformu Bileşenleri tıklayın yeniden yazın ve kurun URL'ye arayın. IIS Yöneticisi'ni yeniden açın.

Sitenizi tıklayın ve URL Yeniden Yaz özelliğini açın. Web.config dosyasında bulunan yeniden yazma kurallarınızı inceleyebilirsiniz. see example here

İlgili konular