簡體   English   中英

PHP網站無法在IIS上正常運行

[英]PHP Web site cannot run properly on IIS

我們運行一個主站點,並希望在/ tesmer文件夾下運行另一個站點。 在演示站點上,它可以完美運行。 當我將其上載到Windows服務器上時,/ tesmer /正確顯示。 像/ tesmer / smmm-sinav-islemleri之類的任何子頁面都有404錯誤。

我們使用Url重寫,在IIS下似乎URL重寫是錯誤的。

開發站點下的工作頁面: http : //demo.dijitall.net/izsm/tesmer/smmm-sinav-islemleri

IIS / Windows Server 2016上的非工作頁面http://yeni.izsmmmo.org.tr/tesmer/smmm-sinav-islemleri

以下是/ tesmer文件夾中的web.config文件

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 10">
                    <match url="^([0-9a-zA-Z-_/]+)$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?par={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 20" stopProcessing="true">
                    <match url="^resimmap.xml$" ignoreCase="false" />
                    <action type="Rewrite" url="resimmap.php" />
                </rule>
            </rules>
        </rewrite>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
</configuration>

解決辦法是什么? 正確的網址寫入規則或其他?

我添加了該規則:

<rule name="tesmer22" stopProcessing="true">

  <match url="^tesmer/([0-9a-zA-Z-_/]+)$" ignoreCase="false" />
    <conditions logicalGrouping="MatchAll">
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
      <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
    </conditions>

  <action type="Rewrite" url="tesmer\index.php?par={R:1}" />        

</rule>   

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM