PHP Web site cannot run properly on IIS

We run a main site and want to run a second site under /tesmer folder. On the demo site it works perfectly. When I upload it on a Windows server just /tesmer/ displayed correctly. Any subpages likes /tesmer/smmm-sinav-islemleri has got 404 error.

We use Url rewrite and it seems like url rewrite is faulty under IIS.

Working page under development site: http://demo.dijitall.net/izsm/tesmer/smmm-sinav-islemleri

Нерабочая страница в IIS / Windows Server 2016 http://yeni.izsmmmo.org.tr/tesmer/smmm-sinav-islemleri

Ниже находится файл web.config в папке / tesmer

<?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>

Какое решение? Правильное правило записи URL-адреса или что-то еще?

0
задан 18 June 2018 в 15:56
1 ответ

Я добавил это правило:

<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>   
0
ответ дан 5 December 2019 в 05:51

Теги

Похожие вопросы