Welcome! Log In Create A New Profile

Advanced

[Regex]how to excludespecific filefromregex

Posted by kubax 
[Regex]how to excludespecific filefromregex
August 05, 2013 02:35PM
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;
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready