Mint within Typo (or other rails apps)
Thursday, April 12th, 2007So I decided to splurge and throw down $30 for Mint since seemed like a lot of people love it, and it looks pretty awesome. Currently my blog is driven by Typo which is Ruby on Rails based. This means that my web folder has rewrite rules to push pretty much any path that isn’t a specific file into the rails app. So putting mint in there at /mint/ would mean it 404s when expecting to fetch index.php. So I just gave mint it’s own htaccess file that rewrites URLs to mint without filename to index.php.
RewriteRule ^mint/$ index.php [QSA]
RewriteRule ^([^.]+)$ $1.php [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
I’m really not that sure if the last 2 lines were at all necessary, I’m thinking no due to the nature of mint, which pushes everything through index.php it looks like.
EDIT: Better yet, google first before just doing it myself and find out that this: Mint Stats for Your Ruby on Rails App has a lot more information and a better solution, not sure why I didn’t bother looking first.
