Skip to content

Instantly share code, notes, and snippets.

@quaid
Created November 20, 2012 19:52
Show Gist options
  • Save quaid/4120591 to your computer and use it in GitHub Desktop.
Save quaid/4120591 to your computer and use it in GitHub Desktop.
Rewrite rules for wiki-ovirt.rhcloud.com
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
# Special conditions for files we want to not be called as MW articles
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# RewriteRule ^favicon.ico %{DOCUMENT_ROOT}/ [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment