...

View Full Version : apache ignoring rewritecond



boeing747fp
09-07-2011, 06:58 AM
.htaccess

############################################
## enable rewrites

# For security reasons, Option followsymlinks cannot be overridden.
# Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

RewriteBase /

############################################
## workaround for HTTP authorization
## in CGI environment

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## always send 404 on missing files in these folders

RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

RewriteRule .* test.php [L]

IndexIgnore *

i have a file "/admin/manage-categories.php" and it now is showing a "not found" error generated by "/test.php"... why does it even process through test.php i thought those !-f and !-d rewriteconditions were supposed to make it not do that?

it seems to have started doing this when i added Password Protection to the /admin folder...

Cags
09-07-2011, 07:23 AM
test.php is the target of an internal rewrite, so the RewriteCond's don't apply to it.

The request comes in, if it's not a file, directory or symlink, then it attempts to serve test.php, since this doesn't exist a 404 page is displayed.

boeing747fp
09-07-2011, 07:26 AM
test.php is the target of an internal rewrite, so the RewriteCond's don't apply to it.

The request comes in, if it's not a file, directory or symlink, then it attempts to serve test.php, since this doesn't exist a 404 page is displayed.

as i stated in my post, there IS a file at "/admin/manage-categories.php".... and there is no 404 page generated, just a "page not found" message that my "test.php" file generates... but test.php should not even be called for the existing file(s) in /admin/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum