I want to host my yii2 advanced project to iis server.In my all projects are hosted in linux server first time i used iis.The problem is iam trying diffrent web config methods to my project but it is not working.
This is my .htacess
Options -Indexes
RewriteEngine On
# deal with admin first
RewriteRule ^adminsgrf/assets/(.*)$ backend/web/assets/$1 [L]
RewriteRule ^adminsgrf/css/(.*)$ backend/web/css/$1 [L]
RewriteRule ^adminsgrf/js/(.*)$ backend/web/js/$1 [L]
RewriteCond %{REQUEST_URI} ^/sgrf/(adminsgrf)
RewriteRule ^.*$ backend/web/index.php [L]
RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L]
RewriteRule ^css/(.*)$ frontend/web/css/$1 [L]
RewriteRule ^files/(.*)$ frontend/web/files/$1 [L]
RewriteRule ^uploads/(.*)$ frontend/web/uploads/$1 [L]
RewriteCond %{REQUEST_URI} !^/sgrf/frontend
RewriteCond %{REQUEST_URI} !^/sgrf/backend
RewriteRule ^.*$ frontend/web/index.php
This web config is trying in iis
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<sectionGroup name="system.webServer">
<sectionGroup name="rewrite">
<section name="rewriteMaps" overrideModeDefault="Allow" />
<section name="rules" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
</configSections>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^adminsgrf/assets/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="backend/web/assets/{R:1}" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^adminsgrf/css/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="backend/web/css/{R:1}" />
</rule>
<rule name="Imported Rule 3" stopProcessing="true">
<match url="^adminsgrf/js/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="backend/web/js/{R:1}" />
</rule>
<rule name="Imported Rule 4" stopProcessing="true">
<match url="^.*$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/sgrf/(adminsgrf)" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="backend/web/index.php" />
</rule>
<rule name="Imported Rule 5" stopProcessing="true">
<match url="^assets/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="frontend/web/assets/{R:1}" />
</rule>
<rule name="Imported Rule 6" stopProcessing="true">
<match url="^css/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="frontend/web/css/{R:1}" />
</rule>
<rule name="Imported Rule 7" stopProcessing="true">
<match url="^files/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="frontend/web/files/{R:1}" />
</rule>
<rule name="Imported Rule 8" stopProcessing="true">
<match url="^uploads/(.*)$" ignoreCase="false" />
<action type="Rewrite" url="frontend/web/uploads/{R:1}" />
</rule>
<rule name="Imported Rule 9">
<match url="^.*$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/sgrf/frontend" ignoreCase="false" negate="true" />
<add input="{URL}" pattern="^/sgrf/backend" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="frontend/web/index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
but its not working properly.Please help how to host yii2 advanced to iis.