Welcome! Log In Create A New Profile

Advanced

Re: location vs. rewite

Anton Yuzhaninov
April 01, 2013 08:58AM
On 04/01/13 16:51, etrader wrote:
> I want to server favicon from a different place rather than the root folder.
> As I explored I have two options
>
> 1.
> location = /favicon.ico { alias /var/www/media/images/favicon.X.ico; }

It is working option.

>
> 2.
> rewrite ^/favicon.ico /var/www/media/images/favicon.X.ico last;

This is wrong - you can rewrite to other location, not to path on file system.
Anyway rewrite does not need here, use location.

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

location vs. rewite

etrader April 01, 2013 08:51AM

Re: location vs. rewite

Anton Yuzhaninov April 01, 2013 08:58AM

Re: location vs. rewite

etrader April 04, 2013 04:16AM

Re: location vs. rewite

locojohn May 05, 2013 03:03PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready