$_GET block by easyengine in pages/posts

Hi, after I upgrade the easyengine I was no longer to get $_GET string parameters inside pages and posts. I have several system that runs inside wordpress pages that stoped to work.

Directly PHP files works without trouble

Maybe a tip how to solve this problem?

Works fine in my Local apache enviroment.

http://domain.site.com/f/?name=andremacola ->not work http://domain.site.com/wp-content/themes/sys/page-f.php?name=asdasd ->works fine

A simple file page-f.php with

if (isset($_GET["name"])) {
echo $_GET["name"];

Already posted solution at - https://github.com/rtCamp/easyengine/issues/317

Not solve the problem. I I know what I am doing at wordpress. Let migrate this topic to here.

/?page_id=25195&nome=andremacola-> without the rewrite rules works fine (disabled in nginx .conf).

http://domain.site.com/wp-content/themes/sys/page-f.php?name=asdasd -> Is just an example.

Even with the get_query_var is not working

You need to register your variable using - http://codex.wordpress.org/Function_Reference/get_query_var#Custom_Query_Vars

Something like:

function add_query_vars_filter( $vars ){
  $vars[] = "my_name";
  return $vars;
add_filter( 'query_vars', 'add_query_vars_filter' );

If you already added a code block like above, try something other than name. e.g. my_name as used above.

Again, I`m not working with WP_Query and even IF.

Just removed the

include common/wpsc.conf;

And put my own location for index.php and now it’s working partially, need to put some more rewrite conf.

You are free to modify easyengine files but it doesn’t interfere with $_GET. Because we use it a lot on our site.

e.g. https://rtcamp.com/subscribe/?newsletter-topic=nginx - query var is used to enable correct subscription check box.

All my clients are in trouble. Maybe if reinstall the nginx easy engine conf files? Any way to do that ?

EasyEngine config files are present at https://github.com/rtCamp/easyengine/tree/master/config/nginx

You may try manual tutorial at - https://rtcamp.com/wordpress-nginx/tutorials/

If you are comfortable with git, just cd /etc/nginx and run git log or git reset --hard to remove your changes. Only if you are comfortable with git.

In wpsc I changed

try_files /app/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php$args;


try_files /app/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?$query_string;

And now everything works fine

Glad to know that.

Please check if other important plugins are working correctly. $args is needed by some. Although $query_string is similar.

Hm… Can you name at least one plugin that require $args argument?

WooCoommerce. It used to break more than a year ago - https://rtcamp.com/wordpress-nginx/tutorials/single-site/wp-super-cache/#important-note

We don’t use or recommend wp-super-cache anymore. Nginx does better job with fastcgi_cache.

100% of my clientes use wp-super-cache. I’ll test fastcgi_cache but wpsc does the job for me for 5 portals and 30.000 unique visitors each site per/day =). You can close this thread now. Thks for the response.

Fine. You can use whatever works for you. Any cache is better than no cache! :smile:

Hello @andremacola,

I hope your query is resolved. I am closing this support topic for now.

Feel free to create a new support topic if you have any queries further. :slight_smile: