I have dozens of rules for rewriting legacy URLs from a previous incarnation of my application. I see three options:
- Just add matching lines to your routes file (config / routes.rb)
- Use rack-rewrite
- Create Nginx / Apache rewrite rules (Nginx in my case)
I believe 3 has better performance than 2, which has better performance than 1.
My questions:
- It's true?
- If so, how much does it matter?
- Are there any other tradeoffs that I may not have considered?
- Any other options in general besides these three?
source share