Welcome Guest, Not a member yet? Register   Sign In
index.php .htaccess trick won't work
#7

[eluser]Aken[/eluser]
[quote author="wiredesignz" date="1328770596"][quote author="Aken" date="1328738875"]... that's a crap .htaccess ...[/quote]

Actually it is far better than the .htaccess file you propose.

In your case any file or directory not found will force a redundant call to your codeigniter application. This means if favicon.ico or robots.txt files don't exist your application will run pointlessly and you have no way of controlling this behaviour. If css referenced images are missing the problem is accentuated further.

The better option it to specify which files and directories should be ignored and which should access the application.[/quote]

Disagree. With your solution, you'd need to update your .htaccess file every single time a new physical file or directory needed to be accessed. That's just one more file that shouldn't need to be touched.

Yes, any other non-existant files will be routed to CodeIgniter. But CI will then see the request, realize it's not a valid URL structure or route or something, and throw a typical 404 error - just like your server would for a non-existant file. As long as you don't autoload a ton of stuff, the overhead is much smaller.

If you want custom 404 pages, you'd have to create them in two different places - one inside CodeIgniter and one independently for server requests.

And then taking into consideration how that RewriteRule is written, if I have any URLs that are not physical files but may start with the same keyword, they will not be routed properly to index.php, thus breaking my application. You're basically giving yourself a list of keywords you can't use.


Messages In This Thread
index.php .htaccess trick won't work - by El Forum - 02-08-2012, 02:00 PM
index.php .htaccess trick won't work - by El Forum - 02-08-2012, 03:07 PM
index.php .htaccess trick won't work - by El Forum - 02-08-2012, 06:21 PM
index.php .htaccess trick won't work - by El Forum - 02-08-2012, 11:06 PM
index.php .htaccess trick won't work - by El Forum - 02-08-2012, 11:25 PM
index.php .htaccess trick won't work - by El Forum - 02-08-2012, 11:56 PM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 01:25 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 01:43 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 01:50 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 01:53 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 02:09 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 02:33 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 02:34 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 02:37 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 02:45 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 02:45 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 02:50 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 10:45 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 11:29 AM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 03:44 PM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 04:18 PM
index.php .htaccess trick won't work - by El Forum - 02-09-2012, 04:34 PM
index.php .htaccess trick won't work - by El Forum - 02-10-2012, 09:00 AM
index.php .htaccess trick won't work - by El Forum - 02-10-2012, 11:06 AM
index.php .htaccess trick won't work - by El Forum - 02-10-2012, 04:19 PM
index.php .htaccess trick won't work - by El Forum - 02-10-2012, 07:09 PM
index.php .htaccess trick won't work - by El Forum - 02-11-2012, 04:15 AM
index.php .htaccess trick won't work - by El Forum - 02-11-2012, 05:09 AM
index.php .htaccess trick won't work - by El Forum - 02-12-2012, 12:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB