RewriteEngine On # make vote.eschew.org/ work RewriteRule ^$ dispatch.php [L] RewriteCond %{REQUEST_URI} !schools/index.php$ # make vote.eschew.org/brandywine/index.js work RewriteRule ^([^/]+)/(.*\..*)$ $2?school=$1 [NS,QSA] # make vote.eschew.org/brandywine/ work RewriteRule ^([^/\.]+)/?$ dispatch.php?school=$1&phase=home [L,QSA] #RewriteCond %{REQUEST_URI} !stats/$ # make vote.eschew.org/brandywine/2005-2006/superlatives work RewriteRule ^([^/]+)/(\d\d\d\d-\d\d\d\d)?/?([^\.\/-]+)?/?([^\./-]*)?/?([^\.-]*)?$ \ dispatch.php?school=$1&year=$2&election=$3&action=$4&detail=$5 [L,QSA] #RewriteRule ^([^/]+)/(\d\d\d\d-\d\d\d\d)/([^\.]+)?$ dispatch.php?school=$1&year=$2 [QSA] # make vote.eschew.org/brandywine/superlatives/ work # make vote.eschew.org/brandywine/superlatives/status work # make vote.eschew.org/brandywine/homecoming/nominate work # vote.eschew.org/brandywine/homecoming/court work # vote.eschew.org/brandywine/homecoming/election work #RewriteRule ^([^/]+)/([^\.\/-]+)/?([^\.-]*)$ dispatch.php?school=$1&election=$2&phase=$3 [L,QSA] #RewriteRule ^([^/]+)/(\d{4}-\d{4})/([^/]+)/([^/]+)/?$ debug.php?school=$1&year=$2&election=$3&action=$4&detail=$5 [L,QSA] # note that vote.eschew.org/brandywine/2006-2007/students.txt does NOT work. this is good. #RewriteCond %{SCRIPT_FILENAME} !-f #RewriteRule .* 404.php [PT] #RewriteRule \.php$ info.php? #ErrorDocument 404 /projects/evotee/404.php