http-referer

Changing the value of referrer [duplicate]

萝らか妹 提交于 2019-12-05 06:19:44
This question already has answers here : Closed 6 years ago . Possible Duplicate: How to manually set REFERER header in Javascript? How to change the value of document.referrer ? I tried this <body> <center><a href="test.php" target="_self">self</a></center> <script type="text/javascript"> alert( document.referrer); document.referrer="test"; alert( document.referrer); </script> </body> It is not working, any ideas? You can't modify the referrer directly, but you can use history.pushState() / history.replaceState() to push a new URL into the browser history (provided the URL you want to push

Nginx: allow access only to referrer that match location name

只愿长相守 提交于 2019-12-05 02:46:26
问题 Is there a way, in nginx, to allow access to a "location" only to clients with a referrer that matches the current location name? This is the scenario: http://foooooo.com/bar.org/ http://foooooo.com/zeta.net/ etc etc I want the contents of the bar.org location available only if the referrer is bar.org. The same goes for zeta.net I know I can do this "statically", but there are a lot of those locations and I need to find a way to do this defining only one "dynamic" location. Sorry for my bad

HTTP_REFERER blank, need alternative

给你一囗甜甜゛ 提交于 2019-12-04 23:14:41
问题 I have a simple signup form that needs to track number of hits from one specific external referer. This is a simple task with PHP's: $_SERVER['HTTP_REFERER'] however, it is blank. After doing some research i tried to use some javascript: document.referrer Still blank. :( I really dont need anything elaborate, but am trying to NOT use awstats. Is there any other way to get the referer (hacks accepted)?? Or am I stuck with the stats??? -thanks 回答1: In short: If the user don't want it, you will

Redirect to referer url in codeigniter

我们两清 提交于 2019-12-04 16:25:41
问题 In messaging system of my project when you get a message from a user you a email alert saying that the another user has sent a message to view the message click here (i.e the url of message) So if the user is not logged in to system he gets redirect to login page and after login it should get back to the referer url. I have made a basecontoller in core folder and extending the CI_controller the authenticating code is as follows. function authenticate($type = 'user') { if($type == 'user') { if

how can a page redirect users back to previous page if they try to access the page via url?

笑着哭i 提交于 2019-12-04 05:47:12
I have a login page which won't be accessible if user is already logged in. So login page tries to redirect logged in users back to the page where they came from. Redirect works if users click a link to go to a page. Problem is if users are in About page try to access login page via url then the referrer agent won't be set so login page is not redirecting users back to About page, instead it is redirecting back to the base url ( i'm using codeigniter and ion auth library). login page's redirect code as below: if($this->ion_auth->logged_in()) { redirect($this->agent->referrer(), 'refresh'); }

HTTP_REFERER blank, need alternative

空扰寡人 提交于 2019-12-03 15:06:28
I have a simple signup form that needs to track number of hits from one specific external referer. This is a simple task with PHP's: $_SERVER['HTTP_REFERER'] however, it is blank. After doing some research i tried to use some javascript: document.referrer Still blank. :( I really dont need anything elaborate, but am trying to NOT use awstats. Is there any other way to get the referer (hacks accepted)?? Or am I stuck with the stats??? -thanks In short: If the user don't want it, you will never know, where he comes from. However, a more "reliable" solution may be to add the referrer to the link

.htaccess Redirect based on HTTP_REFERER

荒凉一梦 提交于 2019-12-02 09:03:07
问题 I'm trying to do what I've said above but I am getting a looping error and sometimes a 500 error! What I want is for users requesting the root 'Home' page of the site to be redirected to /Welcome - UNLESS they are already browsing the site. Here's my code: Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_REFERER} !^mydomain\.co\.uk$ [N] RewriteCond %{REQUEST_URI} /index.php [N] RewriteRule ^$ /Welcome [L] 回答1: You're probably getting the 500 error because the [N] isn't a valid

How to send a URL request as 'Referer'

醉酒当歌 提交于 2019-12-02 01:44:04
问题 I have an app which existed as an iPhone app first and now as an Android app. One of the functions is to load a web page which bypasses the security login by passing a string as Referer. The code for the iPhone is as follows - NSMutableURLRequest *request = [NSMutableURLRequest new]; [request setValue:@"http://myweb.com/" forHTTPHeaderField:@"referer"]; [request setURL:[NSURL URLWithString:@"http://www.theirweb.com/meetings/meetings.plx?CID=TEST2012&O=Generic&Key=4s6p2wz9"]]; [htmlDoc

How to find referrer URL while using htaccess 404 redirect?

妖精的绣舞 提交于 2019-12-01 22:59:18
I've used the code below to create a custom 404 message (page not found) using a .htaccess file. RewriteEngine On ErrorDocument 404 https://%{HTTP_HOST}/404.php It works well, but I want to know what was the wrong URL that caused this redirection. In other words, I need to fetch HTTP referer while user is in 404.php. So I have used $_SERVER['HTTP_REFERER'] in 404.php, but it does not return anything. Where did I have mistakes? And what is your solutions to solve this problem? Remove http:// from 404 handler and have it like this: ErrorDocument 404 /404.php The URL that is causing 404 is