From docs-return-9098-apmail-httpd-docs-archive=httpd.apache.org@httpd.apache.org Fri Nov 05 08:59:59 2010 Return-Path: Delivered-To: apmail-httpd-docs-archive@www.apache.org Received: (qmail 92145 invoked from network); 5 Nov 2010 08:59:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Nov 2010 08:59:59 -0000 Received: (qmail 349 invoked by uid 500); 5 Nov 2010 09:00:30 -0000 Delivered-To: apmail-httpd-docs-archive@httpd.apache.org Received: (qmail 184 invoked by uid 500); 5 Nov 2010 09:00:28 -0000 Mailing-List: contact docs-help@httpd.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@httpd.apache.org List-Id: Delivered-To: mailing list docs@httpd.apache.org Received: (qmail 99848 invoked by uid 99); 5 Nov 2010 09:00:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Nov 2010 09:00:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Nov 2010 09:00:23 +0000 Received: from thor.apache.org (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA59012Z003597 for ; Fri, 5 Nov 2010 09:00:01 GMT Received: (from daemon@localhost) by thor.apache.org (8.13.8+Sun/8.13.8/Submit) id oA5900el003592; Fri, 5 Nov 2010 05:00:00 -0400 (EDT) Date: Fri, 5 Nov 2010 05:00:00 -0400 (EDT) Message-Id: <201011050900.oA5900el003592@thor.apache.org> From: bugzilla@apache.org To: docs@httpd.apache.org Subject: DO NOT REPLY [Bug 47332] [mod_rewrite] SERVER_NAME env var should be the vhost server_name X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Apache httpd-2 X-Bugzilla-Component: Documentation X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: nicolas_froidure@elitwork.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: docs@httpd.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=47332 --- Comment #4 from Nicolas F. 2010-11-05 04:59:57 EDT --- Hi, I'll try to be more clear. Each time i create a vhost, i must put the following rewrite rules inside : RewriteCond %{HTTP_HOST} !www.elitwork.com RewriteRule (.*) www.elitwork.com/$1 [R=301,L] By this way, i ensure the client use the default domain instead of an alias (like elitwork.com). I do it systematically to avoid duplicate content in my websites. As i define a ServerName and a ServerAlias value, i thought the SERVER_NAME global variable was filled with the ServerName value done in the vhost config. But it's not the case. It give the value of the ServerName OR the ServerAlias. So i can't write a generic rule for each vhost of my httpd.conf file. If i could, there will be two major advantages for me (and probably many others) : - currently, it would save 200 lines (50vhost * 2 lines) in my httpd.conf (in fact, i choose to use the .htaacess for readability, but performances are affected by it). That's why i suggested an enhancement : fill SERVER_NAME with the ServerName value defined in the vhost, or, create a DEFAULT_SERVER_NAME variable to allow us to create generic rewriting rules. I assume the fact my first request was not clear and i apologize for it. Thank you. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org For additional commands, e-mail: docs-help@httpd.apache.org