Redirect *.php to path using web.config file

Question

I want to redirect

blog/customfilename.php

to

blog/customfilename

using web.configfile.

I applied this rule:

<rule name="hide .php extension" stopProcessing="true">
    <match url="(.*).php" />
    <conditions>
    <add input="is-quickbooksonline-down" matchType="IsFile" negate="true" />
    <add input="is-quickbooksonline-down" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="is-quickbooksonline-down.php" />
</rule>

but this rule applies on all routes inside blog.

I already applied all tags like in comment section. Trying

<match url = "is-quickbooksonline-down.php" />

or example does not output the desired result.

0
, , ali 4 years 2020-03-27T00:53:04-05:00 0 Answers 127 views 0

Leave an answer

Browse
Browse