For example, when you click the current page from www.baidu.com to jump to www.163.com, the variable $ _ SERVER [& #039; HTTP_REFERER & #039;] becomes the current page once the cross-origin is enabled, how can I break the URL of the previous page? For example, when you click the current page from www.baidu.com to jump to www.163.com, the variable $ _ SERVER ['HTTP _ referer'] becomes the current page once it is cross-origin. I want to get the previous page URL, how can this problem be solved?
Reply content:
For example, when you click the current page from www.baidu.com to jump to www.163.com, the variable $ _ SERVER ['HTTP _ referer'] becomes the current page once it is cross-origin. I want to get the previous page URL, how can this problem be solved?
$ _ SERVER ['HTTP _ referer'] will become invalid if you jump from the SSL authentication website link to your current page,
However, it is no problem to jump to $ _ SERVER ['HTTP _ referer'] To get the previous page URL between different SSL domain names.
$ _ SERVER ['HTTP _ referer'] several possible causes of missing values
- Directly tap the URL in the browser
- Hyperlink icon on windows Desktop
- Bookmarks in the browser
- Links in Word, Excel, and other content
- Links in mail management software such as outlook
- SSL Authentication Website jump
When automatic redirect is set on the meta page, the referer url cannot be obtained in example.com.
Please add.
On the page www.163.com print_r ($ _ SERVER), check if you want
$ _ SERVER ['HTTP _ referer'] # link to the URL of the previous page of the current page