0
votes

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

1
can you please share your full url.Ronak Patel
@RonakPatel admin.mydemosite.com/user-detail?uid=163 this is demo url of my site.Swati
"I have created a template file" Can you please specify teplate file name in your theme?Oleg Apanovich
seems you have configure page url in htaccess. can you please post htaccess code?Vel
@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 WordPressSwati

1 Answers

0
votes

check your nginx config nginx.conf

and your location should be like this.

# WORDPRESS 
location / {
    try_files $uri $uri/ /index.php?q=$uri&$args;
}