Andryushkov Konstantin2014-12-20 21:58:24
Andryushkov Konstantin, 2014-12-20 21:58:24

404 error when following internal links of an Azure site?

Good time of the day.
I'm trying to deal with microsoft Azure and the following problem arose.
I posted several applications and on each there is a 404 error when clicking on internal links, in the window it says: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
Here is one of them aska.azurewebsites.net
Everything works fine on the local computer and third-party hosting, so I assume that the problem is in the Azure settings.
If anyone has experienced this, I would greatly appreciate the help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Andryushkov Konstantin, 2014-12-22

Found the cause of the error. The fact is that my projects were hosted on the apache server, which used the .htaccess configuration file, but the Azure Websites server is IIS and the configuration file for it is web.config. For example, my projects are written using the Yii framework, for which the web.config will be as follows

<?xml version="1.0" encoding="UTF-8"?>
<directoryBrowse enabled="false" />
        <rule name="Hide Yii Index" stopProcessing="true">
            <match url="." ignoreCase="false" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                <action type="Rewrite" url="index.php" appendQueryString="true" />

I hope it's useful to someone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question