Archive for the ‘Uncategorized’ Category

Improve Wordpress permalinks in IIS7

Tuesday, May 5th, 2009

Using Wordpress on a Windows Server with IIS7 causes the permalinks to have “index.php” in the url. An example would be “http://www.smartasseses.be/index.php/2009/05/05/improve-wordpress-permalinks-in-iis7″, while this url is a valid link which will be spidered by search engines, it isn’t as esthetical as one would like.

Removing the “index.php” is rather straightforward, once you know how to. First you wan’t to add the following Web.Config to you virtual directory running the Wordpress blog. This will enable a rewriting rule in IIS7, which will rewrite every request that does not point to a physical file to “index.php”. Basicly transforming it to the way it previously worked.

<?xml version="1.0"?>
<configuration>
    <system.webServer>
      <rewrite>
        <rules>
          <rule name="Main Rule" stopProcessing="true">
            <match url=".*" />
            <conditions logicalGrouping="MatchAll">
              <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php" />
          </rule>
        </rules>
      </rewrite>
    </system.webServer>
</configuration>

Once we’ve added the config we can change the permalink structure in the admin pages of Wordpress. Choose your structure and remove the “index.php” prefix, be sure to leave a slash at the beginning of the desired structure.

// Change this:
/index.php/%year%/%monthnum%/%day%/%postname%/

// To this for instance:
/%year%/%monthnum%/%day%/%postname%/

Breakpoints in Xcode stop firing

Wednesday, February 18th, 2009

Apple's Xcode is a nice IDE and just like every program it has its occasional quirks. Here's a tip: when all of a sudden your breakpoints stop firing, without any apparent reason, try this: Instead of following Googles advice and deselecting the "Load symbols lazily" option in the Preferences screen, (which will solve the breakpoints not hitting, I have to admit) perform a cleanup of your target. (Build – Clean All Targets) This will remove all intermediate files created during the build process and will force Xcode to process every file the next time you build, basicly a full rebuild. Xcode processes only the changed files during subsequent builds, but apparently this incremental strategy fails once in a while, with the aforementioned effect.

In the end both methods solve the problem, but I like to leave the default settings on, instead of changing them to fix some glitch in the system.