Brad Fitzpatrick (bradfitz) wrote in lj_dev,
Brad Fitzpatrick
bradfitz
lj_dev

Denny's & redirect.dat

Sorry --- no code yet. I was about to post it and then everybody on #livejournal in IRC decided to go to Denny's, so we're taking off now. I'll post code when I return, stomach full of grease.

However, here's one interesting thing for now: evan and I are trying to clean up the site directory structure.... here's the LJ redirect.dat file ... it's a symlink to the real file living outside the htdocs tree, so it'll stay up to date.

btw, it remaps uris with parameters to, so /memadd.bml?itemid=xxx will move you to /tools/memadd.bml?itemid=xxx .... whenever it has to do a redirection and there was a referer it also logs where from, so I can fix my links.

i suppose I could've used mod_rewrite for this, but I don't know mod_rewrite, so I chose to do a few lines of perl instead. what's the best way to do this, for future reference?
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments