Resource – URL Rewriting for the Fearful



Fantastic article by Drew McLellan on using url rewriting in your .htaccess files. Covers basics and real world examples. Great as a resource for order of operations, common flags, pitfalls, and sample code. Heavy emphasis on rewriting used by common web frameworks, such as rewriting every request to a master URL for MVC delegation.


  • URL rewrites will send new matching URLs through the rest of your rules. Use the “L” flag or plan accordingly by having “real” files in an excluded directory.
  • Another resource linked from the article – mod_rewrite Beginners guide.