Skip to content

Instantly share code, notes, and snippets.

@sarahhodne
Created April 13, 2009 14:18
Show Gist options
  • Save sarahhodne/94462 to your computer and use it in GitHub Desktop.
Save sarahhodne/94462 to your computer and use it in GitHub Desktop.
ErrorDocument 404 "/index.php"
DirectoryIndex "index.php"
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
error_doc[404] = "/index.php"
directory_index "index.php"
rewrite do |r|
r.static = true # Make static files fall through
r.rewrite /^(.*)$/, "index.php?q=?1", :qsappend => true, :last => true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment