propublica / Capitol-Words

Scraping, parsing and indexing the daily Congressional Record to support phrase search over time, and by legislator and date
BSD 3-Clause "New" or "Revised" License
122 stars 34 forks source link

nginx regex needed for old /compare/ urls #78

Closed timball closed 10 years ago

timball commented 10 years ago

so old compare urls need to be regexed :

old

http://capitolwords.org/compare/q/india,bangladesh/

new

http://capitolwords.org/?terma=india&statea=&partya=&termb=bangladesh&stateb=&partyb=

shouldn't be too terrible .

--timball

timball commented 10 years ago

fixed this did the trick :

    location ~ ^/compare/q/(.+),(.+)/ {
        rewrite ^\/compare\/q\/(.+),(.+)\/ /?terma=$1&statea=&partya=&termb=$2&stateb=&partyb= permanent;
    }

--timball