Answer the question
In order to leave comments, you need to log in
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
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"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<rewrite>
<rules>
<rule name="Hide Yii Index" stopProcessing="true">
<match url="." ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question