Welcome Guest, Not a member yet? Register   Sign In
Redirect 301 lowercase
#11

[eluser]TheFuzzy0ne[/eluser]
I would have thought it would be obvious which is faster. index.php is the first file to be loaded. If you redirect from there, it will be the ONLY file to be loaded.

With hooks, your hook file happens to be the 10th file that's loaded.

Common sense suggests that just putting it into the index.php file will out-perform using hooks. With that said, any difference is fairly minimal. You're probably talking about less than 0.01 seconds, depending on the speed and load of your server. Hooking also allows for cleaner separation, which definitely isn't a bad thing.

Hmm... Common sense... I wonder why they call it "common sense"? It seems to be a lot less common than one might expect... They should call it "rare sense"!

So to summarize, hooking offers cleaner separation of code at the cost of a barely noticeable hit in performance. But (IMHO), it's not bad practice to add extra logic to your index.php file that's required by the entire site, so long as you leave your ./system directory alone, and don't edit below the
Code:
// --------------------------------------------------------------------
// END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE
// --------------------------------------------------------------------
line.
#12

[eluser]ironlung[/eluser]
I'll certainly have no probs editing index.php in the future but....

You not going to believe this...

Quote:Dear customer,

We´re glad that you´ve solved the issue and we thank you to inform us about it. Nevertheless, we inform you that our engineers are working on include RewriteMap function in order to avoid this kind of issues in future.

Kind regards,


Miguel Alvariño Blanes



I did get pretty upset with them yesterday...
#13

[eluser]boltsabre[/eluser]
Thanks for that...

My brain obviously isn't working, it's been a massive 7 days of coding, brain... slowly... frying... fading...farting...
Completely missed/forgot the part about index.php being the first file to be called. The rest is elementary my dear Watson.

I now go hang my head in shame :-( But thanks for clearing that up for me :-)




Theme © iAndrew 2016 - Forum software by © MyBB