Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 82085 invoked from network); 19 Aug 2004 16:02:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 19 Aug 2004 16:02:14 -0000 Received: (qmail 51615 invoked by uid 500); 19 Aug 2004 16:01:32 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 51531 invoked by uid 500); 19 Aug 2004 16:01:31 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 51507 invoked by uid 99); 19 Aug 2004 16:01:31 -0000 X-ASF-Spam-Status: No, hits=2.1 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received: from [204.127.198.39] (HELO rwcrmhc13.comcast.net) (204.127.198.39) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 19 Aug 2004 09:01:28 -0700 Received: from manoharlaptop (c-67-161-59-247.client.comcast.net[67.161.59.247]) by comcast.net (rwcrmhc13) with SMTP id <2004081916012601500n3jrve>; Thu, 19 Aug 2004 16:01:26 +0000 From: "Manohar N Ellanti" To: Date: Thu, 19 Aug 2004 09:01:19 -0700 Message-ID: <001e01c48605$c40b7460$6400a8c0@ManoharLaptop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Checked: Checked Subject: [users@httpd] url rewrite X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Can some one help clarify if this is feasible subdomain-a.maindomain.com subdomain-b.maindomain.com Using url to file rewrite/mapping: in /subdomain-a/.htaccess: Rewriterule ^(.*)$ /www/shared/$1 [E=SUBDOMAIN:A] in /subdomain-b/.htaccess Rewriterule ^(.*)$ /www/shared/$1 [E=SUBDOMAIN:B] Using url to url rewrite/mapping (supposed to be available in Apache 2.0) in /subdomain-a/.htaccess: Rewriterule ^(.*)$ http:/www.maindomain.com/shared/$1 [E=SUBDOMAIN:A] in /subdomain-b/.htaccess Rewriterule ^(.*)$ http:/www.maindomain.com/shared/$1 [E=SUBDOMAIN:B] Though I tried both - I could not access the env variable from the PHP scripts. But, I think a more elegant solution may be setting the original uri request information in a variable that is accessible to scripts like PHP. For instance, SCRIPT_URL or SCRIPT_URI or a new variable something like - URL_BEFORE_REWRITE. This would allow application script engines (perl, php, jsp/servlets) to know the subdomain and accordingly alter the content being served. Another requirement if some one can show me how to do if possible already- After rewrite - the client browser should still show in the address bar the original path - for instance //subdomain-a.maindomain.com/xxxx instead of //www.maindomain/shared/xxxx - -ellanti --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org