Knowledge Base Glossary   
Search  
   
Browse by Category
Knowledge Base .: Web Programming .: Why does every visitor to my website have the same IP address?

Why does every visitor to my website have the same IP address?

Your script is calling for the "REMOTE_ADDR" and receives the IP of a server in front of one of our back-end servers. The web facing server is then passing the scripts output without giving the expected REMOTE_ADDR of the visitor. In order for your scripts to recognize that they are on a cluster and log the correct IP of your visitors, you will need to replace and add the code below.

For PHP:
Locate any lines of code that are similar to this snippet of code,
$_SERVER['REMOTE_ADDR'];
And replace it with this snippet of code,
$_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];

For ASP:
Locate any lines of code that are similar to this snipper of code,
Request.ServerVariables("REMOTE_ADDR")
And replace it with this snipper of code,
Request.ServerVariables("HTTP_X_CLUSTER_CLIENT_IP")


* If you have SSL enabled for you domain you will need to replace the HTTP_X_CLUSTER_CLIENT_IPĀ  with HTTP_X_FORWARDED_FOR

How helpful was this article to you?

Related Articles

article How do I add an email address to the webmail address book?
1. Access your email account by using...

  30-9-2005    Views: 1986   
article What is a catchall address? How do I set a catchall address?
A catchall address is a designated mailbox...

(No rating)  5-10-2005    Views: 1582   
article How can I password protect my website?
You can password protect your website, or any...

(No rating)  27-6-2008    Views: 2785   

User Comments

Add Comment
No comments have been posted.


.: Powered by Lore 1.5.6