Help me please about Rewrite

Igor Sysoev is at
Wed Jun 17 21:34:02 MSD 2009

On Wed, Jun 17, 2009 at 06:45:44AM -0400, i-comers wrote:

> How i can convert this Rewrite Apache to Rewrite as nginx Rewrite
> RewriteRule !(/[^\./]*|\.(|shtml|shtml|html|htm|shtml|php|php3|php4|php5|php6))$ - 
> RewriteRule ^(sq|ar|bg|ca|zh-CN|zh-TW|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|id|it|ja|ko|lv|lt|mt|no|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(.*)$ $2?hl=$1 
> # If not valid html file, view as original (without traslation)
> RewriteRule ^(sq|ar|bg|ca|zh-CN|zh-TW|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|id|it|ja|ko|lv|lt|mt|no|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(.*)$ $2 
> I hope somebody here can help me to convert this Rewrite.
> Regards.

It's not easy to understand inverted RewriteRule's logic.
Also it seems that the first and third rules do nothing.
Could you describe what these rules are intended to do ?

Igor Sysoev

More information about the nginx mailing list