I am facing a problem with the permalink. Urls like http://example.com/sub-page/ works fine with the help of

try_files $uri $uri/ /index.php?q=$uri&$args;

Right now i am working on temporary link which is like

Now the link doesn't work and gives

500 Internal Server Error

Note: I am using webuzo as my server control panel.

1 Answer 1


It looks like your'e missing the subdirectory part relative to the root setting, try this instead:

try_files $uri $uri/ /wordpress/index.php?$args;

and you shouldn't need the q=$uri part.

For subdirectories dir1 and dir2, you could wrap the try_files with locate blocks, something like:

location /dir1/ { 
    try_files $uri $uri/ /dir1/index.php?$args; 

location /dir2/ { 
    try_files $uri $uri/ /dir2/index.php?$args; 
  • So, if i am going to do more temporary installs under on a different folder, i will need to use a second try_files line with the root setting edited? Nov 6, 2014 at 20:48
  • I updated the answer.
    – birgire
    Nov 6, 2014 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.