1

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 http://192.168.100.200/wordpress/

Now the link http://192.168.100.200/wordpress/sub-page/ doesn't work and gives

500 Internal Server Error

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

1 Answer 1

0

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; 
    #...
}
2
  • So, if i am going to do more temporary installs under 192.168.100.200 on a different folder, i will need to use a second try_files line with the root setting edited? Commented Nov 6, 2014 at 20:48
  • I updated the answer. Commented 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.