Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

[Regex]how to excludespecific filefromregex

$
0
0
Hi,

as i can't understandregex (seems likei'm stupid -.-) ihopesomeofyou could help me...

I'd like to have a regex that rewrites all hidden files (and directories) to 404,BUT files named ".album.jpg" in all directories.

The regex for rewriteingall hidden files to404 is this:

rewrite ^(.*)\/\.(.*)$ @404 break;

i tried it with this. but it didn't work:

rewrite ^(?!(album))(.*)\/\.(.*)$ @404 break;

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>