I'm not really all that mysterious

Dreamhost, htaccess, and routes.rb

I have never been able to get my .htaccess file to properly redirect requests from different blog engines. For example, Simplelog tacks on either /archives/ or /past/ to its URLs, and Typo tacks on /articles/ to its posts. That’s one of the things I like about Mephisto: it doesn’t add what I feel are superfluous tokens to the URLs. (Although I am still trying to figure out how to get rid of /archives/ from the monthly posts.)

I assumed that Dreamhost uses Apache exclusively to serve all content, including Rails, which is the reason why you have to set it up to use Fast-CGI for any modicum of efficiency, but I feel like it’s ignoring my .htaccess file.

So I’m using Mephisto’s redirect syntax. I’m not sure where it should really go, but it seems to work with just putting it in routes.rb

The following snippet maps Simplelog’s tagged archives (/past/tag/) to Mephisto’s tagged archives (/tag/)


ActionController::Routing::Routes.draw do |map|  
  Mephisto::Routing.redirect 'past/?' => '$1' # this is the line I inserted
  Mephisto::Routing.connect_with map  
initially published online on:
page regenerated on: