Eliezer Israel
Eliezer Israel

Reputation:

$_GET parameter is not populated, even though URL has appropriate form

I'm working on a new Wordpress site that is exhibiting some strange behaviour. I pass it a URL with GET parameters in it, and the $_GET parameter is not populated. I see in the $_SERVER parameter that the REQUEST_URI has the full URL there, completed with the ?var=value part, but no love in the $_GET variable.

The URL is being redirected with mod_rewrite, but given the fact that the REQUEST_URI shows the full thing, I'm thinking that's not the likely culprit.

Upvotes: 0

Views: 3445

Answers (2)

Baptiste
Baptiste

Reputation: 323

Sorry, it's old, but to whoever might read this : Wordpress won't use custom $_GET variables out of the box : you need to register these custom vars first in order for WP to be able to use them.

I'm no expert about that, but I remember finding very good tutorials about that. Search "adding new WP query vars"

Upvotes: 0

Eliezer Israel
Eliezer Israel

Reputation:

Taken care of. The content of the variable here was itself a URL, encoding it was sufficient to get it passed through. Could be it was picked off by some sort of security on the server.

Upvotes: 1

Related Questions