Closed ei23com closed 4 years ago
Sadly, despite the name and location, that is the correct way to do it. You need to whitelist admin-ajax.php https://wordpress.stackexchange.com/questions/77407/how-does-admin-ajax-php-work
I learned something, thank you!
Here is what I whitelisted it in .htaccess
SetEnvIf Request_URI "(admin-ajax\.php)$" allow
SetEnvIf Request_URI "(admin-post\.php)$" allow
Order allow,deny
Allow from env=allow
Satisfy any
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
AuthName 'admin'
AuthType Basic
require valid-user
Hi, is it possible to do the ajax stuff without the "admin_url('admin-ajax.php')" stuff? I would like to have my wp-admin folder password secured with htaccess, but then public polls wont work.