Welcome Guest, Not a member yet? Register   Sign In
Routes vs htaccess - is there any advantage

As I'm used to rewriting URLs in htaccess this is what I tend to do with my CI sites, and it works OK.
However, as I'm always on the look out for ways to optimise and use best practice, I was wondering whether there is any advantage of getting my head around routes?

I recently ported over a big site to CI and it now requires around 150 lines of URL rewrites in the htaccess file, so I'm thinking, maybe now is the time to start looking at routes

.htaccess will always be faster no matter what. But it's a nightmare to maintain. You probably have a lot of rules there that are redundant or could be done more efficiently.

Personally I only use mod_rewrite to take away the index.php, blocking of access to certain folders/files or for special routes (think access to REST/SOAP interfaces on the same domain).

Theme © iAndrew 2016 - Forum software by © MyBB