Is Iraq “Civil” War Over?

The following comes from the Wall Street Journal:

Good news out of Iraq is becoming almost a daily event: In just the past week, we learned that U.S. combat fatalities (five) dropped in July to a low for the war, that key leaders of al Qaeda in Iraq have fled to the Pakistani hinterland, that troop deployments will soon be cut to 12 months from 15, and that Washington and Baghdad are close to concluding a status-of-forces agreement.

Now this: Shiite cleric Moqtada al-Sadr plans to announce Friday that he will disarm his Mahdi Army, which was raining mortars on Baghdad’s Green Zone as recently as April. Coupled with the near-total defeat of al Qaeda in Iraq, this means the U.S. no longer faces any significant organized military foe in the country. It also marks a major setback for Iran, which had used the Mahdi Army as one of its primary vehicles for extending its influence in Iraq…

In many respects, the story of the Mahdi Army’s decline follows the same pattern as al Qaeda’s: Not only was it routed militarily, it also made itself noxious to the very Shiite population it purported to represent and defend. It enforced its heavy-handed religious edicts, coupled with mob-like extortion tactics, wherever it assumed effective control. The overwhelming Shiite rejection of this brand of politics is another piece of good news from Iraq, as it means that Iraqis will not tolerate Iranian-style theocratic rule. It is also an indication that Iraqi politics is developing in a healthy way. (emphasis added)

Repubs Call For Drilling, Dems Call Recess

Nancy Pelosi’s response to House debate domestic drilling for oil on Friday was to turn off the lights & cameras and send everyone home.  The Republicans want to debate the merits of drilling for some of the over 100,000,000,000 barrels of oil sitting discovered, but untouched under federal lands and coastal waters.  The Democrats lacking any real response to such a suggestion opted for a 5 week vacation to avoid the issue.

The unfortunate “secret” is that the Democrats don’t want gas prices to come down.  Either because A) price shock at the pump will encourage ecological ends or because B) they feel that gas prices will be blamed on Bush (and not on the Congress that was elected with reducing fuel costs as a political promise) which will help Obama in November.

Despite the lack of session, several Republicans are making a stand on the floor of the House again today.  Approximatly 30 Republicans will hold an Energy Debate for “as long as it takes” to get Pelosi to start official bipartisan debate.

Dark Knight Cash Cow

After setting all sorts of records opening weekend records with $158M, The Dark Knight had a solid second week rising to a combined $314M.  This means that Batman is currently holding the 23rd position of highest grossing movies of all time – after 2 weeks.  Another week should place it in the top 10 and gunning for the #2 spot (Star Wars $460M) in its first month.  The mighty Titanic still has some breathing room at $600M and it will be interesting to see if DK has the staying power to knock off the “king of the world”.  Here’s hoping.

Guide to .htacess Redirect Same File Type To Same Domain

I’m adding this guide to my site since it apparently doesn’t exist on the web yet (odd as that seems).  .htaccess files are great and handy but the online info about them is sketchy at best.  Everyone seems to have the same 5 examples on their page, copied verbatim from someone else’s site without any extra explanation.

So here was my quandry…

It’s well known how to redirect single pages (note the first option is the page being moved and is a relative location from the main domain directory while the second option is the absolute location to the new file – even if it is the same domain):

Redirect 301 /oldpage.html http://www.domain.com/newpage.html
Redirect 301 /oldpage2.html http://www.domain.com/newpage2.html
Redirect 301 /oldpage3.html http://www.domain.com/dir/
Redirect 301 /oldpage4.html http://www.domain.com/dir/newpage4.html

Or whole sites:

 Redirect 301 / http://www.newdomain.com/

But if you want to do a certain type of files (like all .html files but not every file on the domain) it gets trickier.  Your fine if you want to change servers:

RedirectMatch (.*)\.gif$ http://www.newdomain.com$1.gif

Or change file types:

RedirectMatch 301 /(.*)\.htm$ http://www.domain.com/oldsite/$1.html

But if you want to simply redirect old site links to a folder/directory on the same site you quickly will discover a problem with endless loops as the somefile.html redirect to /dir/somefile.html will keep getting redirected resulting in a url with /dir/dir/dir/dir/dir/dir/dir/….

[ This will result in a endless loop ]

RedirectMatch 301 /(.*)\.html$ http://www.domain.com/oldsite/$1.html

Since most people online are passing on magic code they really don’t understand, the syntax can take a while to understand. So here is the code you need to make it work:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/dir(.*)
RewriteRule ^(.*)\.html$ http://domain.com/dir/$1.html [R=301,NC,L]
</IfModule>

The <if> isn’t necessary but good programming. This doesn’t redirect if the directory name is in the url already.  The R=301 is the redirect code. The NC makes capitialization not matter.  And the L makes it quit at that point (if you have other rewrite options). Enjoy and thank the apache gods it didn’t take 3 hours of useless googling to figure this out.