I am migrating a little PHP-Application to an Microsoft Azure WebApp.
I know that there are a lot similiar questions on stackoverflow but i can't figure it out on my own.
Previous i had this .htaccess file in one subdirectorie:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ api.php?rquest=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ api.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^(.*)$ api.php [QSA,NC,L]
</IfModule>
I now have this web.config file, i generated it with an online tool and modified it a little bit.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule 1J" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<action type="Rewrite" url="/api.php?rquest={R:1}" appendQueryString="true" />
</rule>
<rule name="rule 2J" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<action type="Rewrite" url="/api.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
Now i dont get an 404 error when trying to access the page. Seems like the web.config is not working at all.
Could please someone tell me whats wrong with my file?