http-referer

Get referring URL for Flask request

空扰寡人 提交于 2020-05-23 05:46:25
问题 When a user visits our site and signs up, how can I capture which website they came from? Be it search, a PR website, etc. I don't care what page from our site they visited, I just want to know which marketing efforts are giving us the most signups. I know Google Analytics can probably do this but I'd like to have something internal for reference as well. 回答1: request.referrer contains the URL the request came from, although it might not be sent by the client for various reasons. The

Get referring URL for Flask request

橙三吉。 提交于 2020-05-23 05:46:02
问题 When a user visits our site and signs up, how can I capture which website they came from? Be it search, a PR website, etc. I don't care what page from our site they visited, I just want to know which marketing efforts are giving us the most signups. I know Google Analytics can probably do this but I'd like to have something internal for reference as well. 回答1: request.referrer contains the URL the request came from, although it might not be sent by the client for various reasons. The

HTTP_REFERER coming back with NULL, key does not exist in $_SERVER

我们两清 提交于 2020-01-06 11:46:26
问题 For the first time since using $_SERVER['HTTP_REFERER'] it gives me NULL as a result. When I do var_dump($_SERVER) the HTTP_REFERER key does not exist. I also try to visit site with different browsers and from different sites but with no result. The website is running on a Linux/Apache based server. How do I fix this? 回答1: Not all browsers will send the HTTP Referer header - you can't rely on it being sent. For instance, there are plenty of privacy addons which will disable sending of the

Url fragment and Referer header

自闭症网瘾萝莉.ら 提交于 2019-12-30 08:10:10
问题 Imagine you are on a page whose URL has a fragment (the part after the # ), and click a link to go to another page. Most browsers will send the URL of the original page to the server in the Referer header. What I want to know is whether or not the URL fragment will be included in this or not. I have seen various behaviors in the wild so this might be browser-specific. Does anyone know which browsers do what? And what does the HTTP spec say on this? 回答1: The spec says that Referer can't

How do you spoof HTTP_REFERER?

风流意气都作罢 提交于 2019-12-29 08:53:07
问题 I need to try and spoof the HTTP_REFERER passed my another page so that in the destination page, I can determine of the request is coming in from the "right" page and perform appropriate logic. How do I do that in JavaScript (AJAX)? Can I do that in ASP.Net? TIA rams 回答1: Generally speaking, you cannot cause other browsers to return a false HTTP_REFERER without an exploit, plug-in, or other extension. If you want to modify the value sent from your web browser and you are using FireFox, look

Which browsers/plugins block HttpReferer from being sent? [closed]

我怕爱的太早我们不能终老 提交于 2019-12-28 07:04:04
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I am trying to interpret HttpReferer strings in our server logs. It seems like there is quite a high number of empty values. I am

Why Twitter's t.co shows up in Referer, but no URL shorteners ever do?

邮差的信 提交于 2019-12-25 09:14:17
问题 I've noticed a whole bunch of Referer links like t.co/oPQO7Xdz in my access_log files, but no other URL shorteners ever show up. Why? 回答1: The URL shorteners never show up because HTTP 301 Moved Permanently et al redirects in HTTP are not designed to influence the Referer HTTP Request Header (apparently, not even if the header is blank, potentially due to the fact that it'll cause inconsistency in behaviour otherwise). However, Twitter does not issue 301 Moved Permanently redirects with its t

Extract Text from HTTP referer

混江龙づ霸主 提交于 2019-12-24 15:42:03
问题 I am using the following code to show the referer link any page on my website. How can i modify the code so that it only shows part of the link. i.e if my website url is www.example.com/?s=printing i only want it to extract printing. And this should only happen if the format is www.example.com/?s=aaa and not if the format is anything else like www.example.com/printing. Code: <?php session_start(); if ( !isset( $_SESSION["origURL"] ) ) $_SESSION["origURL"] = $_SERVER["HTTP_REFERER"]; echo $

Check HTTP_REFERER on a Windows server

百般思念 提交于 2019-12-24 01:22:55
问题 I'm currently migrating from a Linux (Apache) server to Windows (IIS). On Linux I'm using a .htaccess file to check the HTTP_REFERER value, to ensure our files are only being loaded from our site, and not linked to from other sites: RewriteEngine on RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?foo.com [NC] RewriteRule \.(dcr)$ - [NC,F,L] How can I accomplish this on a Windows machine? (Windows Server 2008 R2, IIS 7) 回答1: Have a look at point number 6 at the following location: http:/