Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]clean urls and htaccess problem - host is useless
#6

[eluser]Aken[/eluser]
[quote author="CroNiX" date="1364512288"]You don't need both though. You don't need the -d/-f lines at all if you use the first exclusionary rule. But you don't need them both.[/quote]

There are times where one condition may apply and the other won't. For example, you have a one-off file that you upload to the root directory for whatever temporary/permanent use. If you have only the $1 exclusionary rule, and that file/path isn't defined in the rule, the request will be routed to your application even if the file exists (and may provide a ton of headaches trying to figure out why your obviously-existing file is showing a CI 404 error).

There have even been instances where, since some applications autoload various resources (and some even using hooks to perform actions), code is run unnecessarily because a not-found asset caused a 404 error to run through CI. Sure, that's poor application logic, but TONS of people do it because topics like that can be somewhat advanced.

No, the $1 exclusion is not required (the -f/-d flags should always be used). But they don't conflict with anything or slow things down. It's a good, recommended solution for people who don't understand things like static, non-cookie domains, CDNs, etc.


Messages In This Thread
[SOLVED]clean urls and htaccess problem - host is useless - by El Forum - 03-29-2013, 12:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB