| From | Sent On | Attachments |
|---|---|---|
| Ezra Zygmuntowicz | Nov 7, 2007 3:05 pm | |
| Eden Li | Nov 7, 2007 3:40 pm | |
| Eden Li | Nov 7, 2007 3:42 pm | |
| Wayne E. Seguin | Nov 7, 2007 8:10 pm | |
| Wayne E. Seguin | Nov 7, 2007 8:12 pm | |
| Igor Sysoev | Nov 7, 2007 11:15 pm | |
| Ezra Zygmuntowicz | Nov 8, 2007 3:56 pm |
| Subject: | Re: Rewrite foo.com. to foo.com | |
|---|---|---|
| From: | Eden Li (eden...@public.gmane.org) | |
| Date: | Nov 7, 2007 3:42:04 pm | |
| List: | ru.sysoev.nginx | |
I think the docs have the wrong variable name here. I've been using $http_host instead of $host in my configs without issue.
On 11/7/07, Ezra Zygmuntowicz <ez-NLltGlunAUd/unjJ...@public.gmane.org>
wrote:
Hi there-
I'm trying to sort out a problem a client is having with a googlemap api key. I need to rewrite any requests that end in a . to the same request with no .
example:
incoming request to foo.bar.com. needs to be rewritten to foo.bar.com with no trailing dot , but retaining any uri so
foo.bar.com./qux -> foo.bar.com/qux
Any ideas on how to accomplish this? I tried something like this:
if ( $host ~* (.*?\.?foo\.com)\.)$ { set $domainwithoutdot $1; rewrite ^(.*)$ http://$domainwithoutdot$1 permanent; }
Help?
Thanks
Ezra Zygmuntowicz Founder & Ruby Hacker ezra-NLltGlunAUd/unjJ...@public.gmane.org EngineYard.com





