Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-07-2011, 06:58 AM   PM User | #1
boeing747fp
Regular Coder

 
Join Date: Oct 2003
Posts: 599
Thanks: 1
Thanked 1 Time in 1 Post
boeing747fp is an unknown quantity at this point
apache ignoring rewritecond

.htaccess
Code:
############################################
## 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...
boeing747fp is offline   Reply With Quote
Old 09-07-2011, 07:23 AM   PM User | #2
Cags
New Coder

 
Join Date: Jul 2011
Posts: 67
Thanks: 0
Thanked 13 Times in 13 Posts
Cags is an unknown quantity at this point
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.
Cags is offline   Reply With Quote
Old 09-07-2011, 07:26 AM   PM User | #3
boeing747fp
Regular Coder

 
Join Date: Oct 2003
Posts: 599
Thanks: 1
Thanked 1 Time in 1 Post
boeing747fp is an unknown quantity at this point
Quote:
Originally Posted by Cags View Post
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/
boeing747fp is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:31 PM.


Advertisement
Log in to turn off these ads.