Rewriting request to to

António P. P. Almeida appa at
Mon Jan 31 17:02:10 MSK 2011

On 31 Jan 2011 13h11 WET, appa at wrote:

> On 31 Jan 2011 10h53 WET, zblut at wrote:
> Your rewrite doesn't work because you're not passing along the
> request URI available in the $request_uri variable.
> Use 2 server blocks:
 server {
 ## This is to avoid the spurious if for sub-domain name
 ## rewriting. See
 listen 80;

 rewrite ^ $scheme:// permanent;
 } # server domain rewrite.

I've read incorrectly what you want to do. You just want to
redirect all requests to the root Then the
above works.

--- appa

More information about the nginx mailing list