Need some help with rewrite rule translation
Francis Daly
francis at daoine.org
Wed Jun 19 21:39:04 UTC 2013
On Wed, Jun 19, 2013 at 06:44:55PM +0200, mailinglisten at simonhoenscheid.de wrote:
Hi there,
> This is still driving me mad. We need the expire header for images, but
> if we add the location above, our rules arent processed anymore. If we
> add the expire-header to the locations with the rewrite rules, the
> headers are ignored.
> I would realy appreciate some help.
This is nginx.
One request is handled in one location.
Look at all of the (top-level) "location" directives. Look at the request
that you are making. See which one location will handle it. Be aware of
any rewrites or internal redirects that might happen.
In the one location that handles the final request, put all of the
configuration that you want for that request.
http://nginx.org/r/location for details.
So, you have:
> location ~ /\. {
> # location ~* \.(png|jpg|jpeg|gif)$ {
> location = /favicon.ico {
> location /image {
> location /images {
> location /media {
> location / {
> location @missing {
> location /retargeting_v1 {
> location /recommendations_v1 {
> location /jsmodule {
> location /tiny {
> location /picturetrailers {
> location /flytrailer {
> location /fullexamplecompany {
> location /async {
> location /demo {
> location ~* \.php$ {
What one request do you make that does not return what you want? What
does it return instead?
Testing using "curl -i" is probably best, since you will see exactly what
is returned. Enable the debug log and you might see why that is returned.
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list