> > Did you really just say that every file should just be abstracted as a > > directory... how much of that web 2.0 Kool-Aid did you drink? > > Is there an easier way to encourage clean URLs? > > Without resorting to crazy rewrites?
'Options +Multiviews' in .htaccess works a charm. Making a directory for every page is not what timbl meant when he recommended URLs that don't expose the technology they're using (which could change). > Why bother? The troves of people who cried at Google Reader shutting > down would say otherwise. RSS is "dying" because companies like > Google, Facebook, Twitter want to *own* the flow of information, and > they can't do that when the world uses open plumbing. This is BS. Well said, Andrew, thanks. I still don't really understand what people are doing that requires ~200 lines of shell. I haven't looked at the OP's code, but for completeness I'm attaching the Makefile I use for a website, which I happen to like. Nick
src = \ index.md \ software/index.md \ otherplaces.md tgt = $(src:.md=.html) lnk = $(tgt:.html=) gz = $(tgt:.html=.html.gz) all: $(tgt) $(gz) .md.html: echo "Making $@" echo "<!doctype html><html><head><title>" > $@ sed 's/^#* //;1q' < $< >> $@ echo "</title></head>" >> $@ echo '<link rel="stylesheet" href="/style" /><body>' >> $@ smu < $< >> $@ echo "<hr /><p>Last updated: " >> $@ stat -c %y $< | awk '{print $$1}' >> $@ echo "</p></body></html>" >> $@ ln -sf $@ $* # not POSIX %.gz: % echo "Compressing $<" gzip < $< > $@ clean: rm -f $(tgt) $(lnk) $(gz) .PHONY: all clean .SUFFIXES: .md .html .gz .SILENT:
Options +Multiviews AddEncoding x-gzip .gz