简体   繁体   中英

How to set up url rewrite in iis for WordPress?

how do I set the rewrite url in IIS to load my page without index.php? Eg https://blog.sunamo.cz/2021/12/25/s/ is 404 but https://blog.sunamo.cz/index.php/2021/12/25/s/ is 200.

It no longer appears in the settings:

永久链接设置

Lex Li: Unfortunately no. It seems IIS don't use rewrite rules. I have added:

<rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">
    <match url="*" />
    <conditions>
        <add input="{URL}" pattern="*.php" />
    </conditions>
    <action type="CustomResponse" statusCode="401" statusReason="Unauthorized: Access is denied due to invalid credentials" statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." />
</rule>

test in IIS will match url https://blog.sunamo.cz/index.php , not https://blog.sunamo.cz/index.ph but https://blog.sunamo.cz/index.php is still loading without 401.

The same, if I'm using any snippet from stackoverflow etc., which could help, it have no effect.

Thanks everybody

Solved. It was because app pool was not 32bit, Just one change, recycle and works like a charm!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM