0

I am working on WordPress project. On my server php 7.0 running and the WordPress 4.9.4 installed. The issue that I am facing is: I have created a template file and I am trying to print_r($_GET) the query string variable from the url ?uid=213 then it returns Array() empty array.

When I tried the print_r statement on a different file on root folder then it works properly, but on functions.php or template file ( on WordPress pages ) its not working.

Can anybody tell me about this what is wrong with this?. Below is the my htaccess file code:

 # BEGIN WordPress Options +FollowSymLinks DirectoryIndex index.php ErrorDocument 404 / RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . /index.php [L] # END WordPress 
9
  • can you please share your full url. Commented Feb 24, 2018 at 7:16
  • 1
    @RonakPatel admin.mydemosite.com/user-detail?uid=163 this is demo url of my site. Commented Feb 24, 2018 at 7:21
  • "I have created a template file" Can you please specify teplate file name in your theme? Commented Feb 24, 2018 at 10:01
  • seems you have configure page url in htaccess. can you please post htaccess code? Commented Feb 24, 2018 at 11:53
  • @vel Below is the my htaccess file code. # BEGIN WordPress Options +FollowSymLinks DirectoryIndex index.php ErrorDocument 404 / <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . /index.php [L] </IfModule> # END WordPress Commented Feb 26, 2018 at 4:00

1 Answer 1

0

check your nginx config nginx.conf

and your location should be like this.

# WORDPRESS location / { try_files $uri $uri/ /index.php?q=$uri&$args; } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.