Global www removal/redirect?
Phillip B Oldham
phill at theactivitypeople.co.uk
Tue Jun 10 14:11:44 MSD 2008
Wonderful, thanks!
Igor Sysoev wrote:
> On Tue, Jun 10, 2008 at 09:59:55AM +0100, Phillip B Oldham wrote:
>
>
>> Is there a quick way to remove the redirect from http://www.* to
>> http://* without listing all the domains? I'm about to point a couple of
>> hundred domains to a box running nginx, and need to remove all the www's
>> from the urls for the app to work.
>>
>
> server {
> server_name www.*;
>
> if ($http_host ~* ^www\.(.+)$) {
> set $h $1;
> }
>
> rewrite ^ http://$h$request_uri;
> }
>
>
>
--
*Phillip B Oldham*
The Activity People
phill at theactivitypeople.co.uk <mailto:phill at theactivitypeople.co.uk>
------------------------------------------------------------------------
*Policies*
This e-mail and its attachments are intended for the above named
recipient(s) only and may be confidential. If they have come to you in
error, please reply to this e-mail and highlight the error. No action
should be taken regarding content, nor must you copy or show them to anyone.
This e-mail has been created in the knowledge that Internet e-mail is
not a 100% secure communications medium, and we have taken steps to
ensure that this e-mail and attachments are free from any virus. We must
advise that in keeping with good computing practice the recipient should
ensure they are completely virus free, and that you understand and
observe the lack of security when e-mailing us.
------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phill.vcf
Type: text/x-vcard
Size: 261 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20080610/ecf99d45/attachment.vcf>
More information about the nginx
mailing list