SeanDowney
SeanDowney

Reputation: 17764

Setting a Php $_SERVER value ($_SERVER['something']) using Apache .htaccess

Is it possible using .htaccess or other apache powers to set a custom server value in the php array $_SERVER.

for example

if($_SERVER['is_special']) {
    echo "Yeah for us!";
} else {
    echo "No you fool!";
}

I realize I ask a lot of questions that the answer is no so feel free to say so.

Upvotes: 24

Views: 18166

Answers (1)

Gumbo
Gumbo

Reputation: 655679

Try the SetEnv directive:

SetEnv is_special foobar

Upvotes: 42

Related Questions