Answer the question
In order to leave comments, you need to log in
How to set up a redirect in IIS?
Hello!
By the will of fate, our site is hosted on IIS
At the front, we have angular. To make it friends with SEO, you need to do a few magic steps.
Yandex recommendations on this matter:
For example, if a page is available at www.example.com/blog and contains the meta tag , then the robot will index the HTML version of the page at www.example.com/blog?_escaped_fragment_= .
localhost:8002/cases/aug?_escaped_fragment_=
localhost:8002/snapshots/cases/aug.html
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^.*$" />
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_FILENAME}" matchType="IsFile" pattern="" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" pattern="" ignoreCase="false" />
</conditions>
<action type="None" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^.*$" />
<action type="Rewrite" url="index.html" />
</rule>
<rule name="Snapshots" stopProcessing="true">
<match url=".*localhost\:8002\/(.*)\?_escaped_fragment_=" ignoreCase="true" />
<action type="Redirect" url="http://localhost:8002/snapshots/{R:1}.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question