September 17, 2014

Wordpress site loading problem on windows Azure

If you are getting message on site webpage like: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

Solution :
For that you need to enable URL Rewriting for pretty Permalinks

WordPress on Windows Azure Websites runs under Microsoft Internet Information Services (IIS), not Apache. IIS also supports URL rewriting but the configuration is done in a Web.config file, not in a .htaccess file.

Next, using FTP, WebMatrix or other tool, create a Web.config file

<?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>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

And upload it to the WordPress site's root directory,

Make sure your WordPress Permalink settings do not contain “index.php”
Also make sure in WordPress Settings, General Settings section, the WordPress Address (Site URL) and Site Address (Home URL) are correct.

No comments: