Install on Windows server w/ URL rewrite for permalinks in web.config
-
In reference to a previous post on this subject , I’m having some difficulty getting this plugin to work even with the provided code. The code provided in the previous post to be added to the web.config file was as follows:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="rule 1E" stopProcessing="true"> <match url="^overseer/?$" /> <action type="Rewrite" url="//wp-login.php" appendQueryString="true" /> </rule> <rule name="WordPress Rule" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php?page_id={R:0}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
However, in my web.config file I’ve already put another rule in previously in order to get permalinks to work. So my web.config file with the new rule and my old one looks like this:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Main Rule" 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" /> </rule> <rule name="rule 1E" stopProcessing="true"> <match url="^overseer/?$" /> <action type="Rewrite" url="//wp-login.php" appendQueryString="true" /> </rule> <rule name="WordPress Rule" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php?page_id={R:0}" /> </rule> </rules> </rewrite> <httpErrors errorMode="Detailed" /> </system.webServer> </configuration> https://www.ads-software.com/plugins/hc-custom-wp-admin-url/
With all the rules included, I’m getting a 404 error when I change the wp-login page to a custom log in URL. Looking for a little help here. Thanks!
- The topic ‘Install on Windows server w/ URL rewrite for permalinks in web.config’ is closed to new replies.