My staging application directory is protected by an .htaccess rule containing Require all denied, so I cannot access a diagnostic PHP file through the browser.
I do not want to remove this protection or expose a public diagnostic page.
Is there another safe way to test whether dns_get_record() and DNS_TXT lookups work on my InfinityFree account?
Thank you
Other Information
safe way to test whether dns_get_record() and DNS_TXT lookups work on my InfinityFree account?
Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.
I couldn’t find anything in the knowledge base or on the forum that says whether dns_get_record() or DNS_TXT lookups work on InfinityFree. I also found nothing on a way to run PHP outside the browser, so I can’t give you a sourced answer on either.
The only way I can suggest is general Apache behaviour, not something I found about our hosting. A .htaccess rule applies to the folder it sits in and everything under it. A test file in a folder outside your protected staging directory isn’t affected by that rule, so you wouldn’t need to remove the protection. You’d still need to keep the file private yourself, for example with a hard-to-guess name that you delete right after running it.
You’ve also posted the same question in another topic. Keeping it to one topic will make the answers easier to follow.