Azure App Service WordPress URL Rewrite

Advertisement

NOTE: Please don’t proceed if you don’t have access to your site SSH.

To find your domain configuration file, follow this path, so if your domain is example.com, we need to edit the file /etc/nginx/sites-available/example.com or /etc/nginx/sites-available/example.com.conf.

If in any case example.com or example.com.conf is not available, but the default is present, let’s use the default instead.

Now, open the file and update the following line.

FROM:

location / {
    index index.php index.html index.htm;
}

TO:

location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;
}

After making the changes in the configuration file, one final change is to reload the nginx configuration.

nginx -s reload

WordPress permalinks should be fine now.

Advertisement