Ich habe statische PHP-Seiten im WordPress-Root-Ordner. Auf der web.config
Datei habe ich die Standarddatei in eine statische PHP-Datei geändert home.php
. Ich habe ein paar statische PHP-Seiten und ein paar WordPress-Seiten für meine Website. Für WordPress-Seiten habe ich die SEO-freundliche URL mithilfe von Permalinks geändert, aber statische PHP-Seiten können nicht entfernt werden .php
Erweiterungen.
So was:
http://reactore.com/contact-us/
— WordPress-Seite
http://reactore.com/about-us.php
— statische PHP-Seite
Das ist mein web.config
Datei:
<rewrite>
<rules>
<rule name="WPurls" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
</rules>
</rewrite>
Klicken Sie hier, um meine web.config-Datei bei JSFiddle anzuzeigen