• this is a wordpress/nginx question. i just noticed that https://siteurl/random/path (where /random/path is any path that doesn’t actually exists as a file or directory) is happily accepted by wordpress, which proceeds to serve the site front page.

    i am using nginx and the ‘offending’ config there is:

    location / {
    try_files $uri $uri/ /index.php;
    }

    which is apparently the accepted configuration with wordpress. looks like it makes sense for a php web app.

    i may be misunderstanding something, but here are my questions at the moment:

    why is wordpress serving content for a meaningless uri? how do you make it stop? failing that, can nginx be made to do it without breaking wordpress?

  • The topic ‘siturl/random/path serves front page’ is closed to new replies.