@Jimmy Hat Thanks you for reaching out to Microsoft Q&A. Apologize for the inconvenience caused on this.
Based on the shared information we have understood that you are web app is running on PHP 8.x.
To test this behavior, I have created a webapp which is running with php8.0 and added the below redirect rule all the incoming requests to
/hostingstart.html will get redirected to
/test.php which is present under the path
Since you are changing the default configuration you need to create a custom startup script to make these changes applicable. follow the below set of instructions to create Nginx redirect rule and custom startup script to your web app.
- Navigate to your App Service via the Azure Portal. Under the Development Tools section, select SSH then Go -->.
- Copy the existing configuration and place the file inside the
/home/sitedirectory using this cmdlet
cp /etc/nginx/sites-available/default /home/site/default
- Once you copy
/home/site/defaultedit the default file with your required changes.
- Create a custom startup script with the below and save the file as
- Go to General Settings section under Configuration blade of you web app, For the Startup command enter the path
- Save these settings and restart your Web App.
Reference documentation for writing Nginx Redirect rules for php8.x App service.
Feel free to reach back to me if you have any further questions on this.