Welcome Guest, Not a member yet? Register   Sign In
My App initializes 3 times everything
#3

[eluser]WanWizard[/eluser]
Indeed. Usually .htaccess rewrite rules are the culprit here.

If often see people use (I see even the wiki recommends this):
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

DONT!. This is a lazy man's .htaccess, and will cause these kind of errors.

Instead, make the design of your directory structure, and design your rewrite rules accordingly. For example, create a /assets directory, put all your assets (js, css, images) in this directory structure, and exclude this directory.
Result: no request of a missing image will ever be rewritten to request index.php anymore!


Messages In This Thread
My App initializes 3 times everything - by El Forum - 08-06-2010, 05:34 AM
My App initializes 3 times everything - by El Forum - 08-06-2010, 06:33 AM
My App initializes 3 times everything - by El Forum - 08-06-2010, 08:59 AM
My App initializes 3 times everything - by El Forum - 08-06-2010, 09:51 AM
My App initializes 3 times everything - by El Forum - 08-06-2010, 12:26 PM
My App initializes 3 times everything - by El Forum - 08-06-2010, 07:01 PM
My App initializes 3 times everything - by El Forum - 08-07-2010, 01:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB