K
K
kmx2014-05-27 22:57:53
CMS
kmx, 2014-05-27 22:57:53

How to configure Web.Config correctly?

Hello. There is a site on CMS Orchard, the site is hosted in Azure.
Everything was fine until I noticed an unpleasant feature: links of the form site.ru/map and site.ru/map/ are considered different, if the first one gives the desired page, then the second one gives 404.
So, the question is: how to properly configure the web.config file in order to resolve this misunderstanding?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Tratorov, 2015-01-24
@kmx

You should pay attention to the parameter negate="true"

<rule name="rule1" stopProcessing="true" enabled="true">
<match url="(.*)" negate="false" />
<conditions>
<add input="{HTTP_HOST}" pattern="^site\.com$" negate="true" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://site.com/{R:1}" redirectType="Permanent" />
</rule>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question