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.

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/redirect-php-to-path-using-web-config-file/">

Redirect *.php to path using web.config file</a>
0
, , ali 3 months 0 Answers 84 views 0

Leave an answer