httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Pruim <>
Subject Re: [users@httpd] Checking if file or directory exist
Date Thu, 11 Sep 2008 16:14:03 GMT

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 there will be  
>> a link to
>> 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

>  works but 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

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message