rewrite assistance

daveyfx nginx-forum at nginx.us
Wed Nov 24 07:42:38 MSK 2010


Francis Daly Wrote:
-------------------------------------------------------

> Assuming that this sentence describes your wish:
> 
> location = /preview.php {
>   rewrite ^ /? permanent;
> }
> 
> (untested!) should probably Just Work.
> 
> If you *do* want to vary based on the query string
> (?-bit), the manual
> has an example.
> 
> Good luck,
> 
> 	f
> -- 
> Francis Daly        francis at daoine.org

Francis,

Spot on.  That seems to have done the trick.  Out of my own desire to
learn, is there a way to do the same thing without using the location
directive, and just merely using a rewrite statement?

Thanks!
Dave

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,152792,152854#msg-152854




More information about the nginx mailing list