1

I am using Nginx on Ubuntu to host a Wordpress site and everything is working great except certain file types return the Nginx 404 rather than the Wordpress template 404.

For example: http://www.sbbic.org/something.zip shows the Nginx 404 page.

While http://www.sbbic.org/2014/06/17/free-english-khmer-dictionary-mac-osx-download2 shows the template 404 page.

What am I missing in my configuration of Nginx?

2

I received a response with code that fixed the issue from rtcamp.com

Add this code to the nginx site configuration for the domain has the issue with not all 404 requests being handled by Wordpress:

if (!-e $request_filename) {
        rewrite ^/(.+)$ /index.php?q=$1 last;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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