I spent a whole day debugging a single issue which boiled down to this behavior. It doesn't make sense to me.
I have 2 files index.php and session_plus.php.
Both simply increment a session variable by one for each request.
When I add an .htaccess file with rewrites...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
and hit session_plus.php the session variable is incremented twice. Once by index.php and another time by session_plus.php. When I remove the .htaccess file the request increments once as expected.
I thought the RewriteCond %{REQUEST_FILENAME} !-f rule would make a request bypass index.php completely.
Can someone please explain what is happening here?
Here is the example: http://0image.net/
Here is my code: https://github.com/websitedesignby/0image.net