Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 34766 invoked by uid 500); 27 Mar 2003 20:03:20 -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 34739 invoked from network); 27 Mar 2003 20:03:19 -0000 Received: from vsmtp3.tin.it (HELO smtp3.cp.tin.it) (212.216.176.223) by daedalus.apache.org with SMTP; 27 Mar 2003 20:03:19 -0000 Received: from napoleon (80.117.31.122) by smtp3.cp.tin.it (6.5.033) id 3E48CE9F0117399F for users@httpd.apache.org; Thu, 27 Mar 2003 21:03:22 +0100 Message-ID: <001201c2f49c$35f77300$7a1f7550@napoleon> From: "Andrea Rossignoli" To: References: <001401c2f498$61772600$6501a8c0@XP1> Date: Thu, 27 Mar 2003 21:05:25 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] JOB: rewrite expert needed Hi, with mod_rewrite you could use: RewriteEngine On # Check if the file exits RewriteCond %{REQUEST_FILENAME} !-f # File not found, so redirect internally to getfile.php RewriteRule . getfile.php?file=%{REQUEST_URI} [L] but remember that doing that it will slow down every request because it will check for every request if the file phiscally exists. I'm not sure if that helped.... If I were you I'd play with Errordocument as already suggested by Joshua. Inside error.php you can return a 200 status code using the header function of php. Also you can decide to return an image from a php file too... http://www.zend.com/zend/tut/dynamic.php :-) Andrea ----- Original Message ----- From: "Posts" To: Sent: Thursday, March 27, 2003 20:38 Subject: RE: [users@httpd] JOB: rewrite expert needed > Refresh the page: errordocument actually sends the URL to the users > browser not just the file which is what rewrite does, not going to work > for this. > > The 2nd part is a result of using errordocument, any embedded URLs (ie: > will not be found. I want the > rewrite command to change the request to > "mydomain.com/getfile.php?file=/images/goober.gif" and that script would > go get the real file. > > Been all over the rewrite guide and it has bit and pieces of what I want > but not the whole solution. > > Hope that helps. > > Thanks, > Kawika > > > -----Original Message----- > > From: Joshua Slive [mailto:joshua@slive.ca] > > Sent: Thursday, March 27, 2003 11:29 AM > > To: users@httpd.apache.org > > Subject: RE: [users@httpd] JOB: rewrite expert needed > > > > > > > > On Thu, 27 Mar 2003, Posts wrote: > > > > > Hi, that won't work. I don't want to refresh the page because the > > > missing file could be an html file with images that are also not > > > found. > > > > I have no idea what you mean, either by "refresh the page" or > > by the second part of that sentence. The obvious mod_rewrite > > answers is to adapt the "Search Pages in More Than One > > Directory" section of > > http://httpd.apache.org/docs-> 2.0/misc/rewriteguide.html > > > > > > Joshua. > > > > > > --------------------------------------------------------------------- > > 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 > > > > > --------------------------------------------------------------------- > 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 --------------------------------------------------------------------- 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