Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CF567E07 for ; Wed, 7 Dec 2011 10:54:36 +0000 (UTC) Received: (qmail 3475 invoked by uid 500); 7 Dec 2011 10:54:35 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 3410 invoked by uid 500); 7 Dec 2011 10:54:35 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 3402 invoked by uid 99); 7 Dec 2011 10:54:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2011 10:54:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tchrbupt@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ey0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2011 10:54:28 +0000 Received: by eaai10 with SMTP id i10so482934eaa.18 for ; Wed, 07 Dec 2011 02:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=HMfqsI+He0QPMhEAtffjjHF8xpIao6mxV1dwBGg7mJg=; b=YUThCHY1Oy+CrDPc1RMtYIgQXF+J5HGOan9ehp4ANxTW7fHYtefZYQOrB1poI0SDv2 V7HFzl0PnBAq0eZ40iYPangYgwRGbD12r2MnTme0f43T6nncq/Cocj0uF9qonKF123qS G0SViCEmI+BBZ1+V09SzCh6Di57qHRWb1VxRo= MIME-Version: 1.0 Received: by 10.213.102.13 with SMTP id e13mr585156ebo.69.1323255248205; Wed, 07 Dec 2011 02:54:08 -0800 (PST) Received: by 10.204.194.209 with HTTP; Wed, 7 Dec 2011 02:54:08 -0800 (PST) Date: Wed, 7 Dec 2011 18:54:08 +0800 Message-ID: Subject: questions about document_root From: Rui Hu To: dev@httpd.apache.org Content-Type: multipart/alternative; boundary=0015174be90a04399904b37e5f64 X-Virus-Checked: Checked by ClamAV on apache.org --0015174be90a04399904b37e5f64 Content-Type: text/plain; charset=ISO-8859-1 Hi, I want to modify apache core to implement a function which can achieve following expectations: when I request 1000.xxx.com/test.php ( curl 1000.xxx.com/test.php), originally apache will get absolute address as $document_root/test.php, but I want apache to get "$document_root/1000/test.php". Namely, apache will parse "1000" from the request URI to form absolute address. Then php-cgi can get this php script to execute. Previously, I just modified PHP zend to achieve this function. But considering that other language support would be added to the system such as Python, therefore, modifying Web Server (apache) is a more convenient way. But I'm worried that this modification will result in some unexpected errors in some modules, and I don't know what's the best place I should modify. Should I modify the $document_root or $request_uri ? Really appreciate your help. -- Best regards, Rui Hu ---------------------------------------------------------------------------------------- State Key Laboratory of Networking & Switching Technology Beijing University of Posts and Telecommunications(BUPT) MSN: tchrbupt@gmail.com ----------------------------------------------------------------------------------------- --0015174be90a04399904b37e5f64 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=A0
I want to modify apache core to implement a function which can a= chieve following expectations:

when I request 1000.xxx.com/test.php ( curl 1000.xxx.com/test.php), originally = apache will get absolute address as $document_root/test.php, but I want apa= che to get "$document_root/1000/test.php". Namely, apache will pa= rse "1000" from the request URI to form absolute address. Then ph= p-cgi can get this php script to execute.=A0

Previously, I just modified PHP zend to achieve th= is function. But considering that other language support would be added to = the system such as Python, therefore, modifying Web Server (apache) is a mo= re convenient way.=A0

But I'm worried that this modification will result = in some unexpected errors in some modules, and I don't know what's = the best place I should modify. Should I modify the $document_root or $requ= est_uri ?=A0

Really appreciate your help.

<= br>
--
Best regards,

Rui Hu
----------------------------= ------------------------------------------------------------
State Key L= aboratory of Networking & Switching Technology
Beijing University of Posts and Telecommunications(BUPT)
MSN: tchrbupt@gmail.com
---------------------= --------------------------------------------------------------------

--0015174be90a04399904b37e5f64--