Avoid routing through bootstrap of non existent files

November 29, 2013
by Julian

In some cases you may encounter missing files: images, css or js files.
All those missing files are processed by the current bootstrap: index.php

If the session is set to regenerate on each request, as a normal security measure,
the currently logged user is logged off, because the session ID is different now.

To avoid this, below the following line

RewriteEngine On

add the line :

RewriteCond %{REQUEST_FILENAME} (\.gif|\.jpg|\.png|\.css|\.js)$ [OR]

Save and don’t forget to test.

Even though it’s a well known fact that real men do not test…

This entry was posted in DotKernel. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>