So today I spent a lot of time manually merging the mediawiki data into my wiki (in a new Annvix namespace). There are some various automated tools and mediawiki import/export stuff, but I didn’t have a lot in terms of pages so taking a few hours to do this manually was no big deal (and I figured it would save me time rather than fighting with some maybe-working import/export duo’s). The primary reason for this is that I wanted to keep the Annvix info alive yet (that’s 4.5 years of development “life”), but I didn’t want to maintain what was essentially a read-only wiki. This way I get both since I need to update the wiki when updates come out. This also knocked out another wordpress setup from the annvix blog (no need to keep that stuff around really).

I think, honestly, the biggest pain in the arse was making Apache’s rewrite rules work the way I wanted them to. I still have the domain, and moving the subversion viewvc and repo sub-domain is silly and painful (and neither require much effort on my part), so I’ve left them but still wanted to redirect to Easy enough without cPanel getting in the way and .htaccess files and whatnot, so I finally got it working after much goatee tugging. For the interested, the pertinent bits of the .htaccess file I ended up using are below (criticism welcome!)

Options All -Indexes FollowSymLinks

RedirectMatch permanent ^/repo/$

RedirectMatch permanent ^Annvix:(.+)$$1

RewriteEngine on

RewriteCond %{HTTP_HOST} !^repo\.annvix\.org [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$$1 [L,QSA]

The Apache mod_rewrite stuff always messes me up, so I’m sure there are prettier ways to do it, but at least this seems to work in all the cases that I want.

Share on: TwitterLinkedIn

Related Posts





Stay in touch