• Hello,
    when i open site.com/somedir it will return me automatic to index.php

    How can i remove index.php from url? I mean i want to return 404 when dir is not exist.

    My rules right now is;

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Yui

    (@fierevere)

    永子

    this is fine and will behave like you want (return 404 when directory is not exists)
    (actually returned by WordPress)

    Thread Starter kosmos22

    (@kosmos22)

    This is that I want to return 404 by default to nginx and not via wordpress.
    How can this happen?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove index.php with nginx?’ is closed to new replies.