最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

rewrite rules - Redirect *.php to path using web.config file

programmeradmin1浏览0评论

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)

  1. 暂无评论