httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Pruim <japr...@raoset.com>
Subject Re: [users@httpd] Checking if file or directory exist
Date Wed, 10 Sep 2008 17:42:10 GMT

On Sep 10, 2008, at 1:38 PM, Justin Pasher wrote:

> Jason Pruim wrote:
>>
>> On Sep 10, 2008, at 1:24 PM, Eric Covener wrote:
>>
>>>> . I have some links that look like this: HTTP://purl.schreurprinting.com/mail.php?purl=jasonpruim112
>>> ...
>>>> [purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
>>>> init rewrite
>>>> engine with requested uri /purl/mail.php
>>>
>>> Maybe mail.php is under your docroot, but purl/mail.php isn't.
>>
>> Actually it is... It was something that I tried to fix the problem.  
>> All the links refer to /mail.php though...
>>
>> BEGIN LOG
>> 192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
>> [purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
>> init rewrite engine with requested uri /mail.php
>> 192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
>> [purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3)  
>> applying pattern '.' to uri '/mail.php'
>> 192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
>> [purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (4)  
>> RewriteCond: input='/mail.php' pattern='!-f' => matched
>> 192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
>> [purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (4)  
>> RewriteCond: input='/mail.php' pattern='!-d' => matched
>> 192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
>> [purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
>> rewrite /mail.php -> /p.php
>> 192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
>> [purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
>> local path result: /p.php
>> 192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
>> [purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
>> prefixed with document_root to /Volumes/RAIDer/webserver/ 
>> purl.schreurprinting.com/p.php
>>
>> Also here is my directory structure...
>>
>> qs:/etc/httpd/sites japruim$ ls /volumes/raider/webserver/ 
>> purl.schreurprinting.com
>> build <----Folder
>> design.php
>> inc
>> index.php
>> mail.php
>> p.php
>> php.ini.php
>> pictures
>> print.php
>> purl <----Folder
>> purl.php
>> purl.schreurprinting.com.xcodeproj <----Folder
>> purlprocess.php
>> qs:/etc/httpd/sites japruim$
>
> What does the rewrite log entry look like when you try to just  
> access http://purl.schreurprinting.com/mail.php (without the query  
> string)?
>
> I noticed that the input for the write rule is "/mail.php" (as  
> opposed to /volumes/raider/webserver/purl.schreurprinting.com/ 
> mail.php). Since that file really doesn't exist, it fails the file  
> test. This might be due to the differences in rewrite rules in the  
> apache config versus .htaccess. Do you have a RewriteBase set in the  
> config? It looks like %{REQUEST_FILENAME} is not being evaluated to  
> the full path of the file. I haven't had a chance to test myself in  
> a VirtualHost config setup.


Here is the log for just http://purl.scherurprinting.com/mail.php
BEGIN LOG
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) init  
rewrite engine with requested uri /mail.php
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3)  
applying pattern '.' to uri '/mail.php'
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (4)  
RewriteCond: input='/mail.php' pattern='!-f' => matched
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (4)  
RewriteCond: input='/mail.php' pattern='!-d' => matched
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
rewrite /mail.php -> /p.php
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2) local  
path result: /p.php
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
prefixed with document_root to /Volumes/RAIDer/webserver/ 
purl.schreurprinting.com/p.php
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (1) go- 
ahead with /Volumes/RAIDer/webserver/purl.schreurprinting.com/p.php [OK]


But /volumes/raider/webserver/purl.schreurprinting.com/mail.php is  
valid... that is the entire file system path... but it's there :)

Would this be easier to setup in a .htaccess file?


--

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 <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message