So let us go from the beginning. Already when setting up apache and enabling mod_rewrite problems began.

Simple rules like

RewriteRule ^image$ /images.php

Did work.However a little advanced rules were problem:

RewriteRule ^test$ /index.php?cat=test

I acquired 404 error after i visited /test. I solved the 404 trouble with likely to /etc/apache2/sites-enabled/default-000 and hang AllowOverride None to AllowOverride All

It labored for me personally however I observed STRANGE errors during my error log:

client denied by server configuration: /var/www/image, referer: http://www.x.com/

and

File does not exist: `/var/www/test`

And yeah it happened in my experience too that sometimes server did not load some pictures

Also this 404 error appears to become back that is very strange.

The one thing atmosphere me it does not happen each time but simply from time to time - however frequently enough.

Both rewrite rules for /test and /image are written above.

Cheers.