Monthly Archives: February 2010

Mod_rewrite quick tip

This may be obvious for some mod_rewrite experts but I spent a lot of time to figure it out and I get the feeling I hd this problem before and I forgot what the solution was so here it is:

Mod rewrite does NOT match your pattern on the query string but only on the path part of the URL.
To match the query string you must use the RewriteCond rule.

From mod_rewrite documentation:

Note: Query String

The Pattern will not be matched against the query string. Instead, you must use a RewriteCond with the %{QUERY_STRING} variable. You can, however, create URLs in the substitution string, containing a query string part. Simply use a question mark inside the substitution string, to indicate that the following text should be re-injected into the query string. When you want to erase an existing query string, end the substitution string with just a question mark. To combine a new query string with an old one, use the [QSA] flag.

That last  part about QSA was the one that made me rediscover this 🙂

This week on twitter 2010-02-14

Powered by Twitter Tools

This week on twitter 2010-02-07

  • Hunters and Farmers http://ff.im/fjQws #
  • xvidcap is the best screencasting software for #linux, but why doesn't it capture audio? #
  • @problogger that's my policy too, and tweetdeck makes it easy too with both actions on the same button. in reply to problogger #
  • #chrome may be a bit faster but for some reason I keep coming back to #firefox. #
  • @bensonk42 firebug, working session save/restore, all those saved passwords 🙂 #chrome seems like just an experiment good to play with in reply to bensonk42 #
  • @wpvibe why is a vulnerability in joomla called "wordpress iframe injection" it makes it sound like it's wp's fault. in reply to wpvibe #

Powered by Twitter Tools