php - Prevent site from being viewed as IP
Get the solution ↓↓↓If my website is an A record of 0.0.0.0 for my website example.com, how could I prevent visitors from going to 0.0.0.0? Is there a setting in Apache or PHP where I can block people from viewing the website from location that are not example.com?
Is there a $_SERVER variable I could use to get this information? I have read the PHP docs on server variables and I have seen nothing about getting the "host".
Thank you.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: call to a member function format() on string
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.