0

First time using Microsoft Azure.
I'm using Azure App Service for WordPress for my site farminguru.in for which the A records points to the correct IP address mentioned at Networking in Azure.
DNS is at CloudFlare.
www has CNAME pointing to farminguru.azurewebsites.net

This is what's in the server's .htaccess

# HTTPS forced by SG-Optimizer
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
# END HTTPS

But my APEX domain returns 403. What do I have to do to modify my .htaccess to redirect my APEX to www ?

2
  • What you are asking (to redirect your domain "apex to www") is a standard non-www to www redirect that has been answered here many times before (here's another example). However, I wonder if there is something more to this? What (and why) is generating the 403 response? Is the request even reaching your server instance?
    – MrWhite
    Mar 16 at 14:19
  • The A points to the correct IP but the Azure server seems to be running on nginx ? The user nginx is mentioned in ls of /var/www/wordpress but there exists and .htaccess as well.
    – Farminguru
    Mar 16 at 14:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.