Questions tagged [server-variables]
87 questions
0
votes
1 answer
HTTP_REFERER not displaying anything
I have two websites on two different servers. When I print the following on WEBSITE1 then it displays referrer name (if there is any referrer)
echo $_SERVER["HTTP_REFERER"]
But same code doesn't work on WEBSITE2. It's just a simple echo nothing…

Ali
- 1,801
- 6
- 43
- 58
0
votes
0 answers
Settings ServerName and ServerAdmin in apache2.conf are not shown in PHP-Variables
I was edit the apache2.conf and insert this Lines:
# Global configuration
#
ServerName server-16.******.de
ServerAdmin max.mustermann@******.de
But this values i can't see in the php variables if i look in phpinfo(). The results…

Juppi
- 1
- 3
0
votes
1 answer
When I use Request.ServerVariables("CERT_SUBJECT"), what does the value C=US mean?
When I use Request.ServerVariables("CERT_SUBJECT") I end up getting something like this as a string:
C=US, O=XXX, OU=XXX, OU=XXX, OU=XXX, CN=DOE.JOHN.JACOB.9999999
what does the value C=US mean? is this the cardholder's citizenship? The country of…

Carlos Mendieta
- 860
- 16
- 41
0
votes
0 answers
ASP.NET MVC : check if referrer from same project and specified controller and action
I am working on an ASP.NET MVC project. I have an action which has static base64 of an image.
I want this action to render the correct image only if it is called from myproject/allowedController/allowedAction else show a different image.
I also want…

alamnaryab
- 1,480
- 3
- 19
- 31
0
votes
0 answers
IIS Virtual Directory based on a Server Variable?
Is there a way to set a virtual directory path based on some server side variable?
We have a production and staging web farm as well as development and regression web servers: 7 total.
I want all production web servers to use a virtual directory…

D. Kermott
- 1,613
- 17
- 24
0
votes
2 answers
How to access serverVariable like AUTH_USER in Dot net core
In standard framework, we can context.user.Request.ServerVariables.Get("AUTH_USER");but how to access similar variable in dot net core

Ajit Pawar
- 3
- 6
0
votes
2 answers
ASP Server variable not working on local IIS
I'm working on a simple ASP.Net page (handler, actually) where I check the value of the LOGON_USER server variable. This works using Visual Studio's built-in web server and it works in other sites deployed to the live intranet site. But it doesn't…

Joel Coehoorn
- 399,467
- 113
- 570
- 794
0
votes
1 answer
RewriteCond REQUEST_URI not match whole path
I am quite puzzled.
My goal is to detect, whether redirect is needed (path changed). This is a minimal example.
RewriteRule ^first$ second
RewriteCond %{REQUEST_URI} !^/$1$
RewriteRule ^(.*)$ /$1 [R=301,L]
And I am requesting example.com/first…

Lukáš Řádek
- 1,273
- 1
- 11
- 23
0
votes
0 answers
Set Server Variable in IIS
I dont have much knowledge on IIS Webserver. The Scenario is, I have a cognos Analytics installed has IIS as Webserver(IBM Tool) execute the link in browser which set the "CAM_Passport" as one of the cookie in browser. CAM_Passport is much like a…

Sam
- 61
- 1
- 7
0
votes
0 answers
Can't access server side variables from master page
I am trying to access server side variables from master page and keep getting "xxx does not exists in current context" error and can't seem to find out why.
This is how I have defined the variables and how I am trying to access them:
namespace…

NoBullMan
- 2,032
- 5
- 40
- 93
0
votes
0 answers
Can I change the value of REMOTE_ADDR (and others) using htaccess or PHP?
I'm using a CDN and a firewall that sends the visitors' IP through a specific $_SERVER var. The goal is to avoid changing all the files through the CMS I'm using.
My problem is that since I'm using the firewall, people are not redirected as they…

hellodracon
- 165
- 1
- 12
0
votes
0 answers
Can I Get Referrer Info if "referer" is Empty Due to rel="noopener" on the Link?
I observed some cases where a website would receive empty referrer information if the external link the user clicked on had the rel="noopener attribute.
To summarize what I am seeing:
the server variable HTTP_REFERER (the Referer HTTP header) is…

GWR
- 1,878
- 4
- 26
- 44
0
votes
0 answers
Why the super global array element $_SERVER['SERVER_ADDR'] is not returning proper value?
As per my knowledge the super global array element $_SERVER['SERVER_ADDR'] returns the IP address of the host server.
I've installed PHP using XAMPP server software on my machine that runs on Windows 10 operating system.
I wrote following code in a…

PHPLover
- 1
- 51
- 158
- 311
0
votes
1 answer
PHP Determine host safely and reliable
For my script, which relies on the host url, I need to determine the host and whether it's connection over HTTP protocol or HTTPS protocol.
for instance, if I connect to http://example.com, I would like to retrieve http and example.com
I can of…

TVA van Hesteren
- 1,031
- 3
- 20
- 47
0
votes
1 answer
Are few of the server variables been added and few have been removed in PHP 7?
I am learning PHP from w3schools' PHP tutorial. I'm using PHP 7.0.13
While learning I come across the concept of Global Variables - Superglobals.
This is the page from where I'm learning Global Variables - Superglobals
Note : Please go to the above…

PHPLover
- 1
- 51
- 158
- 311