How to set up a specified route for nginx to access and directly jump to 404 status codes

for example: my domain name is www.abc.com
I want to specify that when a user accesses www.abc.com/xx/, he / she will directly report the 404 status code so that it cannot open
but can access other routing www.abc.com/yy/ to access

normally.

add: the domain name www.abc.com and m.abc.com domain name access the same set of source codes.
to implement www.abc.com/xx/ report 404, while m.abc.com/xx/ can access it normally

Mar.05,2021

xx refers specifically, right?

location / xx {

return 404; 

}


location /xx/ {
        return 404;
}

location / xx/ {

    return 404;

}
xx is another directory under the root directory


just be a location

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32d60-2b5c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32d60-2b5c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?