1

main page: (should be / or anything other than phpmyadmin and other folder....)

location ~ (?!phpmyadmin|smf|zDev|DiscordCommunicator|wordpress|Monitor|announcements) {
#...
}

fastcgi pages (should start with / and phpmyadmin or any of the other folders):

location ~ (?:phpmyadmin|smf|zDev|DiscordCommunicator|wordpress|Monitor|announcements)\/[a-zA-Z0-9]+\.php {
#...
}

special page (should be any js file or html or....):

location = (?:phpmyadmin|smf|zDev|DiscordCommunicator|wordpress|Monitor|announcements)\/([a-zA-Z0-9]+\.(?:js|mhtml|htm?l|css|png|gif|jpg:jpeg:xml|ico|map|webp|svg|woff|woff2|ttf|ttc|otf|eot|mp3|m4a|aac|ogg|midi|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv))$ {
#...
}

main fastcgi page (should be / with phpmyadmin or any other folder only):

location = (?:phpmyadmin|smf|zDev|DiscordCommunicator|wordpress|Monitor|announcements)(?:\/$|$) {
#...
}

i am trying to manage paths' regex on NGINX's location blocks...any page or directory always points to the main page without respect of any other location block...(e.g phpmyadmin/index.php is ignored and / location block is used instead) these regular expressions works like charm on regex sites like regexr but doesn't work with NGINX idk why

Zorono
  • 11

0 Answers0