Using rewrite rules to have a tidy blog

Today, I was playing with apache mod_rewrite and decided to make my blog a little bit tidier. So I created a rule to make all my links looking like:[storyID].

Since there are many many tutorials on the web on howto use mod_rewrite I`m not going to go into details.

I created an .htaccess file under my web root directory containing these:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^blog/([0-9]+)$ /blog/haber.php?id=$1 [nc]

So it takes any requests in the form of /blog/[a number] and maps it to the url: /blog/haber.php?id=[the number]

This is a basic regular expression.

And I went into my blog code and changed all the links from the haber.php?id=$id to $id only ; )

That simple!

Update: Murat pointed out that actually this wouldn`t work for urls like  /blog/182/ (with a trailing slash) But I already have a rule to redirect the entries with a trailing request with a 301. And then the rules above kicks in. And the rule is:

RewriteRule ^blog/([0-9]+)/$ /blog/$1 [R=301,N]

Things that my poor brain cannot understand…

Here, I read an Intel whitepaper about how one can improve the performance of Snort (or an IDS system) using Intel multi-core architecture. I recommend you to read that whitepaper, it`s full of nice ideas about distributing the packet capture and the other steps like decoding, pattern matching, etc over different CPU cores and taking advantage of large L2 cache for expensive pattern matching operations.

Now the part that I cannot understand: Snort does not have multi-core, multi-thread support… In the whitepaper Intel says that they modified the code so that it runs multi threads.

The Snort application was modified to run multiple threads and to pin flows to execution cores.

My questions are: Does Intel care to share this code with snort community? So that we can improve our snort sensors, and tend to buy more Intel CPUs? Is sourcefire aware of this (I`m sure they are) and were they involved on “modifying snort to run multi threads”? I want to know this cause my snort box is choking under the load of a gigabit traffic!

It looks like snort will have multi thread support in the next major version 3.0. But I couldn`t see much in snort cvs about this. Either the new version is developed somewhere behind the doors (the code is not ready for public yet!), or it`s still is an idea.

Snort being day after day “commercialized”, the dirty nessus example, not having a similar product in the market as good as snort and nessus, makes me worry everyday about the future of free security products… :

Pardus 2007 is out.

The new Pardus is out. (I`m late to announce here 🙂 )

I`m seeding the distro through p2p (torrent). So if you want to grab it using your favourite p2p client here is the torrent URL. Do not get it and go away! Please seed some 😉

Update: Here is the official torrent. I`m seeding this one also 😛