Answer the question
In order to leave comments, you need to log in
All format files except for a specific one?
Good day.
It costs nginx and behind it apache
Tell me how to properly exclude a file with a specific name from the regular expression.
Example:
exclude file named my.jpg from regular expression
location ~* ^.+\.(...|ico|jpeg|jpg|...)$ {
...
}
Answer the question
In order to leave comments, you need to log in
Priorities location , but it is better to read in the original dock.
location = my.jpg {
...
}
location ~* ^.+\.(...|ico|jpeg|jpg|...)$ {
...
}
location ~ ^my\.jpg$ {
...
}
location ~* ^.+\.(...|ico|jpeg|jpg|...)$ {
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question