• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Routes vs htaccess - is there any advantage

#1
[eluser]surfgatinho[/eluser]
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

#2
[eluser]n0xie[/eluser]
.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).


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.