K
K
kavalar22017-03-14 15:36:21
Yii
kavalar2, 2017-03-14 15:36:21

How to properly set up Yii2 advanced on iis?

Need to set up Yii2 advanced on iis?
Here is my web.config, at the root:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
  <rewrite>
    <rules>
      <rule name="rule 1l" stopProcessing="true">
  <match url="^secure(.*)?$"  />
  <action type="Rewrite" url="backend/web/{R:1}"  />
</rule>
<rule name="rule 2l">
  <match url="^([^/].*)?$"  />
  <action type="Rewrite" url="frontend/web/{R:1}"  />
</rule>
    </rules>
  </rewrite>
</system.webServer>
</configuration>

and in frontend/web :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
  <rewrite>
    <rules>
      <rule name="Hide Yii Index" stopProcessing="true">
        <match url="." ignoreCase="false" />
        <conditions>
        <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="index.php" appendQueryString="true" />
      </rule> 
    </rules>
  </rewrite>
</system.webServer>
</configuration>

The main page works, but the rest of the pages give a 404 error.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-03-14
@webinar

And the search came up with cowards?
https://yandex.ru/search/?text=iis%20yii2&lr=13&cl...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question