Forum Discussion

SergeiDrewEmerge's avatar
SergeiDrewEmerge
Copper Contributor
Nov 22, 2023

WordPress App how to restrict access to specific pages on the site

Hello all,

 

I have a WordPress App hosted on Azure and I am struggling with how I can secure specific pages from public access. 

 

For example:

 

http://www.mysite.com/wp-admin

http://www.mysite.com/info.php

 

I'd like it so that only specific IP addresses or Microsoft user accounts can access some, such as admin pages and for some pages I'd like no access at all, to where it just blocks any sort of visit. 

 

I've viewed the documentation for Front Door and some networking restrictions but that seems to be just IP addresses and I'm confused about how I can set those rule for specific pages within the App. 

 

I know WordPress offer plugins which have this sort of functionality but I'd like to take advantage of Azure's security features rather than plugins from WordPress. 

 

Any help is very appreciated. Thank you

 

 

1 Reply

  • khatland's avatar
    khatland
    Copper Contributor

    This either require changes in your application and routemap in the application itself.
    Without any information around how your application is built that is impossible to solve.
    However the simplest way of solving the issue you describe is through using an Azure Application Gateway in front of your application. There you can restrict access to URIs based on a number of variables. 

Resources