Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: Need some help with rewrite rule translation

$
0
0
On Wed, Jun 19, 2013 at 06:44:55PM +0200, mailinglisten@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@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 53287

Trending Articles



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