Skip to content

Instantly share code, notes, and snippets.

@jashmenn
Created March 18, 2009 21:52
Show Gist options
  • Save jashmenn/81429 to your computer and use it in GitHub Desktop.
Save jashmenn/81429 to your computer and use it in GitHub Desktop.
# .htaccess file to redirect a hosted mediawiki with ugly urls to another server with pretty urls.
# Assumed that this is in a .htaccess file in in, say, the "mediawiki" directory.
# the rules change if it was in a server config.
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{QUERY_STRING} title=(.*)
RewriteRule ^index.php(.*) http://wiki.mydomain.com/%1? [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment