404 errors, many people know that if the URL you want to visit does not exist, you will read and display this page. In the past, when dealing with 404, we usually do a few lines of words, and those who are interested may also beautify it slightly. Another small number of people who want to take advantage of the opportunity even use meta tags for delayed steering. That's all, in fact, 404 can help us do a lot of things, which is the focus of today.
First, let me explain what my 404 can do for me:
1. He can tell me when and where the user from wanted to access me which URL failed.
2. He can tell me why the other party wants to access this URL and help me optimize the website
3. Can he tell me the other party's IP address
4. Can he tell me what this person is about
5. I can let him shut up those who don't want to tell me
6. He can send me what he wants to tell me by email
7. He can help me do 301 permanent redirection.
8. Can he tell me someone is trying to hack my website or host
It sounds mysterious and dazzling. OK, let's discuss how he did it.:
1. We can use PHP to capture the user's source URL and current URL, so we can do the first point very simply.
2. Because there is a source URL, you can intuitively guess the user's intentions. Let me give you an example. Just like my website //. If the source URL of a user is //, and the current URL captured is ///?id=1, this means that when this person clicks on a person's profile page when he clicks on a person's profile page, he will make an error. It means: The ID=1 may not exist, the product has been deleted, so you have to check whether there is a hyperlink to the URL on the website. If there is, you have to find a way to delete it!
3. This function is relatively simple. You only need to use PHP to capture the other party's IP. Then, you can know where the person comes from by combining the IP of other websites to convert the IP to physical address.
First, let me explain what my 404 can do for me:
1. He can tell me when and where the user from wanted to access me which URL failed.
2. He can tell me why the other party wants to access this URL and help me optimize the website
3. Can he tell me the other party's IP address
4. Can he tell me what this person is about
5. I can let him shut up those who don't want to tell me
6. He can send me what he wants to tell me by email
7. He can help me do 301 permanent redirection.
8. Can he tell me someone is trying to hack my website or host
It sounds mysterious and dazzling. OK, let's discuss how he did it.:
1. We can use PHP to capture the user's source URL and current URL, so we can do the first point very simply.
2. Because there is a source URL, you can intuitively guess the user's intentions. Let me give you an example. Just like my website //. If the source URL of a user is //, and the current URL captured is ///?id=1, this means that when this person clicks on a person's profile page when he clicks on a person's profile page, he will make an error. It means: The ID=1 may not exist, the product has been deleted, so you have to check whether there is a hyperlink to the URL on the website. If there is, you have to find a way to delete it!
3. This function is relatively simple. You only need to use PHP to capture the other party's IP. Then, you can know where the person comes from by combining the IP of other websites to convert the IP to physical address.