Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 85533 invoked from network); 11 Sep 2008 16:14:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 16:14:45 -0000 Received: (qmail 48940 invoked by uid 500); 11 Sep 2008 16:14:34 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 48651 invoked by uid 500); 11 Sep 2008 16:14:33 -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: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 48640 invoked by uid 99); 11 Sep 2008 16:14:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 09:14:32 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [24.247.187.246] (HELO raoset.com) (24.247.187.246) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 16:13:33 +0000 Received: from [192.168.0.253] (unknown [192.168.0.253]) by raoset.com (Postfix) with ESMTP id 4184B1714D59 for ; Thu, 11 Sep 2008 12:14:04 -0400 (EDT) Message-Id: <669C274D-580D-41F5-A744-99DA5A7E6960@raoset.com> From: Jason Pruim To: users@httpd.apache.org In-Reply-To: <48C935C8.2010806@newmediagateway.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Thu, 11 Sep 2008 12:14:03 -0400 References: <48C7F770.1040202@newmediagateway.com> <894FC97C-F898-4894-ACB7-C192E4224B63@raoset.com> <1404e5910809101024m737e6e11w7b7935a0e737100d@mail.gmail.com> <0856B8C8-94BF-4D56-BF69-7A2B5E7FA965@raoset.com> <48C80600.4090008@newmediagateway.com> <0454D60E-A728-4F6A-B9CF-54BA9E5E4012@raoset.com> <48C8103F.707@newmediagateway.com> <1404e5910809110430y248297c8w121b7ea04c3c5297@mail.gmail.com> <48C935C8.2010806@newmediagateway.com> X-Mailer: Apple Mail (2.926) X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Checking if file or directory exist On Sep 11, 2008, at 11:14 AM, Justin Pasher wrote: > Jason Pruim wrote: >> On Sep 11, 2008, at 7:30 AM, Eric Covener wrote: >> >>> On Thu, Sep 11, 2008 at 6:28 AM, Jason Pruim >>> wrote: >>> >>>> Here is my .htaccess file... Does it look right? >>>> >>>> Options +FollowSymlinks >>>> RewriteEngine on >>>> RewriteLog /var/log/purl.virt.rewrite.log >>> >>> is this valdi in .htaccess? >> >> My guess is no since it's not working... > > Log directives cannot be used in .htaccess files (it could be a > potential security hole to allow a user to specify their own logs, > hammer the site with requests, then fill up a partition). Normally > you would receive a 500 error code and a message in the apache error > logging stating the directory is not allowed. You can, however, just > leave it in the global/virtualhost apache config. > >>>> RewriteLogLevel 9 >>>> >>> >>> where's RewriteBase? >> >> I thought that rewritebase was optional? > > It is optional. It all depends on your setup/usage as to whether you > need to use it. > >>>> RewriteCond %{REQUEST_FILENAME} !-d >>>> RewriteRule . /p.php [L] >>> RewriteCond %{REQUEST_FILENAME} !-f >>> >>> You're not capturing or passing anything, and how do you get to >>> mail.php? >> >> after you load purl.schreurprinting.com/jasonpruim112 there will be >> a link to http://purl.schreurprinting.com/mail.php?purl=jasonpruim112 >> >> The basic premise I have been working off of is just simply if the >> file exists, let that file handle serving the page, if it DOESN"T >> exist pass it to p.php to handle it. >> >> So with that understanding I don't think that I need to capture >> anything in the rewritecond's other then if the file exists correct? > > You shouldn't have to worry about capturing any query string since > you are performing an internal rewrite (the URL stays the same for > the user). Referring back to your other email (which I mistakenly > nuked already)... > > -------------------- > That is odd.... I moved the rewrite rules to a .htaccess file and > now the real links work right, but the false links don't go into my > handeler script... in other words http://purl.schreurprinting.com/mail.php?purl=jasonpruim112 > works but http://purl.schreurprinting.com/jasonpruim112 does NOT... > > Here is my .htaccess file... Does it look right? > > Options +FollowSymlinks > RewriteEngine on > RewriteLog /var/log/purl.virt.rewrite.log > RewriteLogLevel 9 > > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule . /p.php [L] > -------------------- > > So there is no file/directory called jasonpruim112 >, correct? I copied your .htaccess file (removing the RewriteLog* > references) and it correctly rewrites the URL request for / > jasonpruim112 to > p.php. Is this not what you are seeing? Hey Justin, You are correct that jasonpruim112 does not exist but is linked in a database... Although, I did some searching on the net and fighting with my config files and noticed that AllowOverides was set to none rather then all.... Once I made that switch both the main link, and the internal links all started working properly. Sometimes I hate how picky computers can be hehehe. -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com japruim@raoset.com --------------------------------------------------------------------- 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