rewrite rule to remove trailing dot from hostname

Andrew Grim lists at ruby-forum.com
Wed Aug 27 22:20:10 MSD 2008


Igor Sysoev wrote:
> On Wed, Aug 27, 2008 at 02:11:32AM +0200, Andrew Grim wrote:
> 
>>     }
>> 
>> I've also tried
>> 
>>     if ($host ~ "\.$" ){
>>       rewrite ^(.*) http://<%= http_host_name %>$1 permanent;
>>     }
>> 
>> And a number of other things. Any ideas would be greatly appreciated!
> 
> The $host has no trailing dot, use original $http_host instead.

Perfect, thanks!
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list