«
»


Mod Rewrite Tip

Posted by jon on May 20, 2008

Just a quick mod_rewrite tip for everyone out there. I spent a little time today working on some rewrite rules for an upcoming feature on IntenseDebate. I didn’t realize before today, however, that query parameters are not part of the expression matching in mod_rewrite. That is, http://www.domain.com/url/param1/param2?abc=123, will stop matching after param2 in this case. When you think about it, this makes a lot of sense really…unfortunately I didn’t realize this until I spent a good 30-45 minutes in frustration wondering what was wrong with my regular expression. If you do want to do something with the query parameters you can access them by using the variable %{QUERY_STRING} in your script.

Hopefully this helps someone else out there.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

1 Comment »

Hey Jon, testing out a post from google reader…

June 13th, 2008 | 3:30 pm

Comment