开发者

ErrorDocument 404 Not Sending Referrer Information: PHP

开发者 https://www.devze.com 2022-12-12 01:54 出处:网络
I\'m using a standard htaccess ErrorDocument 404 to redirect users to a new page.In order to customize the 404, I need to know their referrer information (from the page they Tried to visit).

I'm using a standard htaccess ErrorDocument 404 to redirect users to a new page. In order to customize the 404, I need to know their referrer information (from the page they Tried to visit).

$_SERVER['HTTP_REFERER'] is empty

I printed out all of my global variables and most contain the link to pageNotFound.php.

How can I开发者_高级运维 retrieve this information? (Server-Side is preferred)


It should be in $_SERVER['HTTP_REFERER'] Yours is mispelled.


HTTP_REFERER doesn't have a double r. It's an unfortunate misspelling in the HTTP spec.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号