Don't go crazy...
Make sure .htaccess change the following line:
From:
RedirectMatch permanent ^.*/var/.*$
http://www.yourdomian.com/x-cart-path/error_message.php
to:
<FilesMatch !"\.(css|js)$">
RedirectMatch permanent ^.*/var/.*$
http://www.yourdomain.com/x-cart-path/error_message.php
</FilesMatch>
Good Luck... It works for me...