Skip to content

Instantly share code, notes, and snippets.

@caius
Created August 21, 2009 15:15
Show Gist options
  • Save caius/172087 to your computer and use it in GitHub Desktop.
Save caius/172087 to your computer and use it in GitHub Desktop.
### HABARI START
RewriteEngine On
# Redirect index.php?id=5 to ?id=5
# This assumes your blog is located at /habari
# If it isn't, remove or change "habari" in the next two lines
RewriteCond %{THE_REQUEST} ^\w+\ /habari/index.php\?id=(\d+)
RewriteRule ^(.*)$ /habari/?id=%1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# This assumes your blog is located at /habari
# If it isn't, remove or change "habari" in the next line
RewriteBase /habari
RewriteRule . index.php [PT]
RewriteRule ^(system/(classes|locale|schema|$)) index.php [PT]
### HABARI END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment