With CRMs like WordPress, Joomla etc. that use routing, is it possible to apply Require ip or Require not ip rules to arbitrary routes? For example, I want to close the admin pages to the Internet users and restrict them to the authorized admin users on the LAN. If they have to work remotely, they’d have to get on our VPN.
So, for example, https://www.example.com should be accessible from the Internet, but https://www.example.com/admin/login should be only accessible from the LAN subnet.
I thought that putting a Directory element in the .conf file, needless to say .htaccess, is not going to work because the routed path does not exist on disk, and indeed this does not work. Is there another method?