Questions tagged [mod-env]

5 questions
4
votes
1 answer

Not getting value in $_SERVER from SetEnv variable in htaccess

I have set some variables in .htaccess file with SetEnv but it's not getting by php file using $_SERVER. Here is the code of htaccess: RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME}…
Chetan Nakum
  • 413
  • 6
  • 19
2
votes
3 answers

How to enable mod_env in Apache

I'm trying to set Environment variables for PHPMailer and need to enable mod_env in the httpd.conf. I know if you're using Apache (and mod_env is enabled), then Envirnoment variables can be specified in .htaccess. Here is my httpd.conf in XAMPP:…
Ali.Ghodrat
  • 3,348
  • 3
  • 31
  • 31
1
vote
1 answer

How to pass Apache environment variable to url in .htaccess

I am setting a apache environment variable through php function, apache_setenv. apache_setenv("EXAMPLE_VAR", "Example Value"); But I am having problem accessing this variable inside .htaccess I am not able to use this env variable inside .htaccess…
Abhishek Gurjar
  • 7,426
  • 10
  • 37
  • 45
0
votes
2 answers

How to write an IF contains condition matching 2 ENV variables set via RewriteRules

To give context, the goal: Using apache httpd I need to test a contextual segment of the request uri is contained within a cookie value sent in the header before redirect the user to a splash page for cookie confirmation, or allowing them access to…
0
votes
1 answer

How to set Mod_Env in Apache24 Windows

Maybe a silly question, but how do I pass environment variables in apache. I have enabled the LoadModule env_module modules/mod_env.so statement in apache's httpd.conf file and I know from documentation that I should use the statement PassEnv…
N. Maks
  • 539
  • 3
  • 15