Home >Backend Development >PHP Tutorial >How to get the address bar url in php pseudo-static
After the program became pseudo-static, search engines included a large number of previous dynamic addresses. How to deal with it? You may think that setting 301 is enough, but it seems that it will take quite a while for search engines to update 301, and it is still a bit difficult to access the previous dynamic address when searching. After all, you still want to access the static address, so you need to add it to the page. Make a judgment call. First of all, I used the PHP built-in function. Because the program was pseudo-static, I found that the real URL addresses obtained were basically different from the displayed URL. I searched online for a long time and couldn't find a solution. The problem is indeed very difficult. I accidentally saw an asp example, which contained: http_x_rewrite_url, so I tried it with php, but unexpectedly I could get the address in the address bar, and the problem was solved. Example, how to get the address bar URL using PHP pseudo-static.
|