Thanks for posting this good question.
Apologies for the delay and any inconvenience with this.
If you’re hosting your WebApp on Azure App Service, you may try the following steps. If it’s Cloud Service
or any other Azure service please just let us know.
Ensure that you are adding .htaccess file
to your repository root (Wwwroot).
If you wish to deploy in folder other than wwwroot, you may try with this:
Create .htaccess in
wwwroot folder with following content (replace newdocumentrootfolder with path to your new folder under wwwroot):
RewriteEngine On
RewriteCond %{REQUEST_URI} !newdocumentrootfolder/
RewriteRule (.*) newdocumentrootfolder/$1 [L]
The web framework of your choice may use a subdirectory as the site root. For example, Laravel,
uses the public/
subdirectory
as the site root. If is the case, then please try way:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ /public/$1 [NC,L,QSA]
</IfModule>
After the above modifications, if the issue still persists, please restart the WebApp (if feasible), and then check to see if that helps and let us know for any further assistance with this issue.