Caveat
I know this question is a little out of date and our question/issue is technically regarding an Azure WordPress Resource not a hosted environment… but I thought it might be helpful to answer for future readers.
Background/Issue
We spun up an Azure Worpress resource and migrated our site to it using updraft. Once transferred and browsing the site we had the same issue:
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Solution
Tom mentioned above that it’s an Azure issue. And looking further in, it’s more specifically it ended up being an IIS web.config
issue. Here are steps we took to correct it:
Getting to the web.config file
-
In the Azure portal go to the wordpress resource and then to Advanced Tools:
-
Once we got to the Kudu interface we navigated to the Debug console -> PowerShell (or CMD if you prefer). Then navigated to the root wordpress directory where the
web.config
lives:
Editing the web.config file
-
After opening it up the problem was pretty obvious. Somehow Azure spun up the wordpress resource without adding the correct rewrite rules. Or maybe our updraft transfer overwrote it…
-
So we just added the appropriate rewrite rules. (for an azure wordpress resource)
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="WordPress: http://your-azure-site.azurewebsites.net" patternSyntax="Wildcard"> <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"/> </rule> </rules> </rewrite> </system.webServer> </configuration>
-
Save it!
Once we saved it the wordpress pretty permalinks worked as expected!