If you're like me, you've gotten used to .html extension free URLs for
entry links. Want this for hobix on Apache? Here's how:

Add this to your configuration (makes .html optional if the file exists):

        RewriteCond   /hobix.dir/htdocs%{REQUEST_FILENAME}.html -f
        RewriteRule   (.*) $1.html

Add this to lib/local.rb:

module Hobix
class BaseEntry
    def link_with_strip
      link_without_strip.gsub(/\.html$/, '')
    end

    alias_method :link_without_strip, :link
    alias_method :link, :link_with_strip
end
end

Now hobix will generate links without .html suffixes. Best used with
the new "lower-case-dashed-post-title" support.

Leon

_______________________________________________
Hobix-is-the-way mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/hobix-is-the-way

Reply via email to