Wordpress Nginx config PHP code question
location / {
try_files $uri $uri/ /index.php?$args;
}
I believe I understand how it works. When you surf to
It first tries to find cat/this-is-a-post in the documentroot. If not found, it tries cat/this-is-a-post/
If this doesn't work it passes some arguments $args to the index.php file.
Question: How do I access the value(s) in $args from within the php code in index.php?
The thing is I want to get hold of the "/cat/this-is-a-post" string, which I can via $SERVER["REQUESTURI"], but I want to know what is in $args as well.
pannix
2 Replies
Trying to read some documentation on this but it gives me a headache, maybe the value of $args is supposed to end up in $SERVER["REQUESTURI"]?