Recent Topics

1 Apr 28, 2009 09:09    

My b2evolution Version: 2.x

I'm noting some strange behaviour and am not sure if it's due to a mal-configured .htaccess file, or a server issue.

I have this in the .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


I believe that it's pretty standard.

Now if I read and understood the mod_rewrite documentation correctly, these two lines:

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


Indicate that a rewrite should NOT be applied if the requested file or directory exists. Correct?

However, I'm finding occasionally that I'm getting the b2evolution 404 page for files/directories that do exist when I request them. (Not always so though; I can access files in the media directory just fine)

It seems to be somehow dependent on the requested names though, somehow. For example, I was trying to install another php application, phpshell. If I had this here:

./phpshell/phpshell.php

where ./ also contains the above .htaccess file.

If I try to request this file, I get a 404 error. However, if I rename the file and directory to:

./shell/shell.php

It works, somewhat. Except using certain portions of the application will also result in a b2evolution 404.

It seems that the mod_rewrite is not fully honouring the rules? Has anyone seen something like this before and have any suggestions as to what might be the cause?

2 Apr 28, 2009 15:32

Not a full answer but :

b2evo404 == index.php was called with a "tail" it couldn't understand, which "shouldn't" happen unless the file doesn't exist ( assuming that none of your files are stub files taht don't belong to a blog )

The evo 404's you're getting for /yourapp/.htaccess is because you're calling the root /index.php ;)

If the above is all you have in your htaccess then you probably want to email your host and ask them why it happens for existing files.

¥


Form is loading...