Skip to content

Instantly share code, notes, and snippets.

@boxedup
Created July 13, 2010 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boxedup/473787 to your computer and use it in GitHub Desktop.
Save boxedup/473787 to your computer and use it in GitHub Desktop.
Refraction.configure do |req|
Rails.logger.debug "Path: #{"#{req.path}#{"?" unless req.query.blank?}#{req.query}"}"
request_string = "#{req.path}#{"?" unless req.query.blank?}#{req.query}"
domain_redirects = {
"www.wwf-adopt-an-animal.org" => "www.wwf-animal-adoptions.org.uk",
"wwf-adopt-an-animal.org" => "www.wwf-animal-adoptions.org.uk"
}
path_rewrites = {
'www.charity-gifts.org' =>
{
'/go.php?1' => 'http://www.s2d6.com/x/?x=c&z=s&v=2330190&k=[NETWORKID]',
'/go.php?10' => 'http://www.s2d6.com/x/?x=c&z=s&v=650154&r=1&k=CG&t=http://www.musthavegifts.org/WorldVision/GiftCertificateSelection/GiftCertificate.aspx?CertificateID=958&ParentView=All',
'/go.php?133' => 'http://www.s2d6.com/x/?x=c&z=s&v=2297739&k=[NETWORKID]',
'/go.php?143' => 'http://www.awin1.com/cread.php?awinmid=2584&awinaffid=65680&clickref=shop&p=http%3A%2F%2Fwww.giftshop.cancerresearchuk.org%2F',
'/go.php?144' => 'http://www.s2d6.com/x/?x=c&z=s&v=2358710&k=[NETWORKID]',
'/go.php?145' => 'http://www.s2d6.com/x/?x=c&z=s&v=308518&k=[NETWORKID]',
'/go.php?147' => 'http://www.s2d6.com/x/?x=c&z=s&v=1366208&k=chicks&t=http://www.presentaid.org/invt/chicks',
'/go.php?150' => 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=37349&merchantID=1238&programmeID=3654&mediaID=0&tracking=&url=http://www.practicalpresents.org/view_product.php?product_id=7',
'/go.php?16' => 'http://charityshop.at/SOUKH?LID=shop',
'/go.php?165' => 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=37349&merchantID=4321&programmeID=11016&mediaID=0&tracking=&url=',
'/go.php?166' => 'http://www.s2d6.com/x/?x=c&z=s&v=2335666&k=[NETWORKID]',
'/go.php?17' => 'http://www.s2d6.com/x/?x=c&z=s&v=1366208&k=[NETWORKID]',
'/go.php?18' => 'http://www.anrdoezrs.net/click-1917330-10414108',
'/go.php?19' => 'http://www.anrdoezrs.net/click-1917330-10414956',
'/go.php?2' => 'http://www.s2d6.com/x/?x=c&z=s&v=792362&k=G',
'/go.php?29' => 'http://track.omguk.com/?AID=2336&MID=4738&PID=4908&CID=179586&WID=12776',
'/go.php?4' => 'http://www.s2d6.com/x/?x=c&z=s&v=1340498&k=PolarBear',
'/go.php?49' => 'http://track.omguk.com/?PID=5140&AID=2336&CID=226788&MID=4615&WID=13178',
'/go.php?5' => 'http://www.s2d6.com/x/?x=c&z=s&v=2112652&k=[NETWORKID]',
'/go.php?58' => 'http://track.omguk.com/?PID=5140&AID=2336&CID=226788&MID=4615&redirect=http%3A%2F%2Fwww.giftsinaction.org.uk%2Fbuy%2Ffilter%2Fbestsellers',
'/go.php?6' => 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=37349&merchantID=917&programmeID=3146&mediaID=0&tracking=CG&url=',
'/go.php?70' => 'http://www.s2d6.com/x/?x=c&z=s&v=693634&k=polarG',
'/go.php?81' => 'http://www.s2d6.com/x/?x=c&z=s&v=1617234&k=OrangG',
'/go.php?93' => 'http://www.s2d6.com/x/?x=c&z=s&v=2335807&k=[NETWORKID]',
'/go.php?98' => 'http://www.s2d6.com/x/?x=c&z=s&v=1366208&k=worms&t=http://www.presentaid.org/Animal-lovers/A-wormery/invt/wormery'
},
'www.wwf-adopt-an-animal.org' =>
{
'/go.php?80' => 'http://www.s2d6.com/x/?x=c&z=s&v=792363&k=TigerG',
'/go.php?82' => 'http://www.s2d6.com/x/?x=c&z=s&v=55169&k=dolphG'
},
'www.wwf-animal-adoptions.org.uk' =>
{
'/children/go.php?136' => 'http://being.successfultogether.co.uk/click.asp?ref=267628&site=5642&type=b7&bnb=7',
'/children/go.php?164' => 'http://www.s2d6.com/x/?x=c&z=s&v=2028139&k=[NETWORKID]',
'/children/go.php?165' => 'http://www.s2d6.com/x/?x=c&z=s&v=2019543&k=[NETWORKID]&t=https://services.everychild.org.uk/LoginManagement/AdhocGiftOption.aspx',
'/children/go.php?173' => 'http://www.awin1.com/awclick.php?mid=2488&id=65680',
'/children/go.php?29' => 'http://being.successfultogether.co.uk/click.asp?ref=267628&site=5642&type=b3&bnb=3',
'/go.php?100' => 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=37349&merchantID=2279&programmeID=6701&mediaID=0&tracking=&url=http://www.torturecare.org.uk/get_involved/50',
'/go.php?102' => 'http://www.awin1.com/cread.php?awinmid=1456&awinaffid=65680&clickref=CAweek&p=http%3A%2F%2Fwww.caweek.org%2F',
'/go.php?109' => 'http://nationaltrustmemberships.at/SOUKH',
'/go.php?110' => 'http://www.awin1.com/awclick.php?gid=77031&mid=1987&awinaffid=65680&p=http://www.bhf.org.uk/learnmore',
'/go.php?113' => 'http://clkuk.tradedoubler.com/click?p=121350&a=1690303&g=18059334',
'/go.php?116' => 'http://being.successfultogether.co.uk/click.asp?ref=267628&site=4214&type=text&tnb=74',
'/go.php?117' => 'http://being.successfultogether.co.uk/click.asp?ref=267628&site=4214&type=text&tnb=75',
'/go.php?118' => 'http://www.s2d6.com/x/?x=c&z=s&v=1735096&k=PandaG',
'/go.php?119' => 'http://www.s2d6.com/x/?x=c&z=s&v=792363&k=Tiger',
'/go.php?12' => 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=37349&merchantID=3132&programmeID=8138&mediaID=55241&tracking=&url=',
'/go.php?120' => 'http://www.s2d6.com/x/?x=c&z=s&v=1617234&k=OrangG',
'/go.php?121' => 'http://www.s2d6.com/x/?x=c&z=s&v=55169&k=dolphG',
'/go.php?122' => 'http://www.s2d6.com/x/?x=c&z=s&v=1735099&k=EleG',
'/go.php?124' => 'http://www.s2d6.com/x/?x=c&z=s&v=1735098&k=RhinoG',
'/go.php?137' => 'http://track.omguk.com/?PID=5942&AID=2336&CID=2801885&MID=43852&WID=6158',
'/go.php?138' => 'http://www.s2d6.com/x/?x=c&z=s&v=1355563&k=[NETWORKID]',
'/go.php?139' => 'http://www.s2d6.com/x/?x=c&z=s&v=1355565&k=[NETWORKID]',
'/go.php?140' => 'http://www.s2d6.com/x/?x=c&z=s&v=1355564&k=[NETWORKID]',
'/go.php?148' => 'http://charityshop.at/SOUKH?LID=handbags&DURL=http://www.oxfam.org.uk/handbags',
'/go.php?151' => 'http://www.awin1.com/awclick.php?mid=2584&id=65680',
'/go.php?152' => 'http://clkuk.tradedoubler.com/click?p=103399&a=1190848&g=17866810',
'/go.php?154' => 'http://track.omguk.com/?PID=6255&AID=2336&CID=2835791&MID=14302&WID=6158',
'/go.php?160' => 'http://www.awin1.com/awclick.php?mid=2584&id=65680',
'/go.php?161' => 'http://www.s2d6.com/x/?x=c&z=s&v=1942292&k=[NETWORKID]&t=http://www.britishlegion.org.uk/support-the-legion',
'/go.php?162' => 'http://www.awin1.com/awclick.php?mid=2584&id=65680',
'/go.php?17' => 'http://caredonations.at/SOUKH?CTY=1&CID=6565',
'/go.php?173' => 'http://www.awin1.com/awclick.php?mid=2488&id=65680',
'/go.php?177' => 'http://www.s2d6.com/x/?x=c&z=s&v=2335666&k=[NETWORKID]&t=http://www.concerngifts.org/product.php?sp_p=K&sp_c=0',
'/go.php?178' => ' http://www.s2d6.com/x/?x=c&z=s&v=2335666&k=[NETWORKID]&t=http://www.concerngifts.org/product.php?sp_p=A&sp_c=0',
'/go.php?18' => 'http://www.awin1.com/cread.php?awinmid=2584&awinaffid=65680&clickref=&p=https%3A%2F%2Fdirectdebit.cancerresearchuk.org%2Fdonate.asp%3Fid%3D70',
'/go.php?180' => 'http://www.s2d6.com/x/?x=c&z=s&v=2335666&k=[NETWORKID]&t=http://www.concerngifts.org/product.php?sp_p=J&sp_c=0',
'/go.php?182' => 'http://www.s2d6.com/x/?x=c&z=s&v=2335666&k=[NETWORKID]&t=http://www.concerngifts.org/product.php?sp_p=H&sp_c=0',
'/go.php?183' => 'http://www.s2d6.com/x/?x=c&z=s&v=2335666&k=[NETWORKID]&t=http://www.concerngifts.org/product.php?sp_p=D&sp_c=0',
'/go.php?186' => 'http://www.s2d6.com/x/?x=c&z=s&v=2519401&k=[NETWORKID]',
'/go.php?2' => 'http://www.s2d6.com/x/?x=c&z=s&v=792362&k=Generic',
'/go.php?20' => 'http://www.s2d6.com/x/?x=c&z=s&v=2330190&k=[NETWORKID]',
'/go.php?30' => 'http://being.successfultogether.co.uk/click.asp?ref=267628&site=5642&type=text&tnb=4',
'/go.php?32' => 'http://www.s2d6.com/x/?x=c&z=s&v=1330096&k=memGend4c',
'/go.php?34' => 'http://www.s2d6.com/x/?x=c&z=s&v=1330096&k=memGend4c',
'/go.php?37' => 'http://www.s2d6.com/x/?x=c&z=s&v=792362&k=G',
'/go.php?42' => 'http://www.s2d6.com/x/?x=c&z=s&v=55169&k=dolphG',
'/go.php?48' => 'http://www.s2d6.com/x/?x=c&z=s&v=1308264&k=WSPA',
'/go.php?5' => 'http://track.omguk.com/?PID=4858&AID=2336&CID=172328&MID=4615&WID=6158',
'/go.php?52' => 'http://www.s2d6.com/x/?x=c&z=s&v=308518',
'/go.php?53' => 'http://www.s2d6.com/x/?x=c&z=s&v=639070&k=d4c',
'/go.php?54' => 'http://www.s2d6.com/x/?x=c&z=s&v=561309&r=[RANDOM]&k=[NETWORKID]',
'/go.php?55' => 'http://track.omguk.com/?PID=4998&AID=2336&CID=488351&MID=4954&WID=6158',
'/go.php?56' => 'http://www.s2d6.com/x/?x=c&z=s&v=2170725&k=[NETWORKID]&t=http://www.worldlandtrust.org/supporting/donation.htm',
'/go.php?58' => 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=37349&merchantID=917&programmeID=3146&mediaID=0&tracking=RSPBtxt1&url=http://www.rspb.org.uk/jointoday/pages/199223',
'/go.php?62' => 'http://www.s2d6.com/x/?x=c&z=s&v=1758533&k=[NETWORKID]',
'/go.php?66' => 'http://track.omguk.com/?PID=4961&AID=2336&CID=172787&MID=4744&CRID=10331&WID=6158',
'/go.php?68' => 'http://www.s2d6.com/x/?x=c&z=s&v=677726&k=D4CBlog&t=http://www.greatgifts.org.uk/?adid=dgmvenxmas08',
'/go.php?69' => 'http://www.s2d6.com/x/?x=c&z=s&v=2112647&k=[NETWORKID]',
'/go.php?7' => 'http://track.omguk.com/?PID=4858&AID=2336&CID=172328&MID=4615&CRID=10806&WID=6158',
'/go.php?70' => 'http://www.s2d6.com/x/?x=c&z=s&v=2112649&k=[NETWORKID]',
'/go.php?71' => 'http://www.s2d6.com/x/?x=c&z=s&v=2112652&k=[NETWORKID]',
'/go.php?76' => 'http://track.omguk.com/?PID=5089&AID=2336&CID=181180&MID=4615&WID=6158',
'/go.php?80' => 'http://track.omguk.com/?PID=4906&AID=2336&CID=247033&MID=4738&WID=6158',
'/go.php?81' => 'http://track.omguk.com/?PID=4907&AID=2336&CID=259785&MID=4738&WID=6158',
'/go.php?89' => 'http://track.omguk.com/?PID=5169&AID=2336&CID=392019&MID=5101&WID=6158',
'/go.php?92' => 'http://members.commissionmonster.com/z/80152/4496/',
'/go.php?94' => 'http://www.s2d6.com/x/?x=c&z=s&v=2108025&k=[NETWORKID]',
'/go.php?96' => 'http://www.ndcs.org.uk/',
'/health/go.php?11' => 'http://being.successfultogether.co.uk/click.asp?ref=267628&site=5596&type=text&tnb=2',
'/health/go.php?135' => 'http://being.successfultogether.co.uk/click.asp?ref=267628&site=5596&type=text&tnb=2',
'/health/go.php?150' => 'http://www.awin1.com/cread.php?awinmid=2584&awinaffid=65680&clickref=shop&p=http%3A%2F%2Fwww.giftshop.cancerresearchuk.org%2F',
'/health/go.php?155' => 'http://clk.tradedoubler.com/click?p=118411&loc=27185&g=17946714',
'/health/go.php?162' => 'http://www.awin1.com/awclick.php?mid=2584&id=65680',
'/human-rights/go.php?12' => 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=37349&merchantID=3132&programmeID=8138&mediaID=55241&tracking=&url=',
'/human-rights/go.php?161' => 'http://www.s2d6.com/x/?x=c&z=s&v=1942292&k=[NETWORKID]&t=http://www.britishlegion.org.uk/support-the-legion',
'/human-rights/go.php?163' => 'http://www.s2d6.com/x/?x=c&z=s&v=1942379&r=[RANDOM]&k=[NETWORKID]',
'/poverty/go.php?129' => 'http://charityshop.at/SOUKH?LID=Unwrapped&DURL=http://www.oxfam.org.uk/shop/Hub.aspx?catalog=Unwrapped',
'/poverty/go.php?130' => 'http://charityshop.at/SOUKH?LID=ethical&DURL=http://www.oxfam.org.uk/shop/Hub.aspx?catalog=HighStNew',
'/poverty/go.php?131' => 'http://charityshop.at/SOUKH?LID=donated&DURL=http://www.oxfam.org.uk/shop/Hub.aspx?catalog=HighStDonated',
'/poverty/go.php?143' => 'http://www.s2d6.com/x/?x=c&z=s&v=1358014&k=[NETWORKID]',
'/poverty/go.php?144' => 'http://www.s2d6.com/x/?x=c&z=s&v=1358012&k=[NETWORKID]',
'/poverty/go.php?158' => 'http://www.s2d6.com/x/?x=c&z=s&v=1864997&k=[NETWORKID]&t=http://www.sendacow.org.uk/directdebit',
'/poverty/go.php?159' => 'http://www.s2d6.com/x/?x=c&z=s&v=1864995&k=[NETWORKID]',
'/poverty/go.php?175' => 'http://www.s2d6.com/x/?x=c&z=s&v=2354225&k=[NETWORKID]&t=http://www.redcross.org.uk/donatesection.asp?id=77029&campaigntab=regular',
'/poverty/go.php?176' => 'http://www.s2d6.com/x/?x=c&z=s&v=2354225&k=[NETWORKID]&t=http://www.redcross.org.uk/donatesection.asp?id=77029&campaigntab=single',
'/poverty/go.php?30' => 'http://being.successfultogether.co.uk/click.asp?ref=267628&site=5642&type=text&tnb=4',
'/poverty/go.php?59' => 'http://charityshop.at/SOUKH?LID=shop',
'/poverty/go.php?98' => 'http://www.s2d6.com/x/?x=c&z=s&v=2358710&k=[NETWORKID]',
'/wildlife/go.php?113' => 'http://clkuk.tradedoubler.com/click?p=121350&a=1690303&g=18059334',
'/wildlife/go.php?125' => 'http://www.s2d6.com/x/?x=c&z=s&v=693634&k=polarG',
'/wildlife/go.php?133' => 'http://www.s2d6.com/x/?x=c&z=s&v=1308337&r=[RANDOM]&k=[NETWORKID]',
'/wildlife/go.php?153' => 'http://petinsure.at/SOUKH',
'/wildlife/go.php?156' => 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=37349&merchantID=3907&programmeID=9754&mediaID=0&tracking=&url=',
'/wildlife/go.php?166' => 'http://clkuk.tradedoubler.com/click?p=121350&a=1690303&g=18108618?url=http://ad.uk.doubleclick.net/clk;216062054;38535653;d?http://www.ciwf.org.uk/your_food/default.aspx',
'/wildlife/go.php?167' => 'http://www.s2d6.com/x/?x=c&z=s&v=2112654&k=[NETWORKID]',
'/wildlife/go.php?168' => 'http://www.s2d6.com/x/?x=c&z=s&v=2133586&r=[RANDOM]&k=[NETWORKID]',
'/wildlife/go.php?169' => 'http://www.s2d6.com/x/?x=c&z=s&v=2270803&k=penguin',
'/wildlife/go.php?170' => 'http://www.s2d6.com/x/?x=c&z=s&v=2252155&k=LeopardG',
'/wildlife/go.php?171' => 'http://www.s2d6.com/x/?x=c&z=s&v=2252153&k=TurtleG',
'/wildlife/go.php?20' => 'http://www.s2d6.com/x/?x=c&z=s&v=2330190&k=[NETWORKID]'
}
}
global_path_writes = {
'/contacts.php' => '/contacts/new',
'/a-z-charity-gift-providers.php' => 'http://www.charity-gifts.org/charities',
'/about-us.php' => 'http://www.donation4charity.org/pages/about-us',
'/actionaid-charity-gifts.php' => 'http://www.charity-gifts.org/charities/gifts-in-action-from-actionaid',
'/actionaid-gifts-in-action.php' => 'http://www.charity-gifts.org/charities/gifts-in-action-from-actionaid',
'/adopt-a-turtle-marine-conservation.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/adopt-a-turtle-from-mcs',
'/adopt-an-animal.php' => 'http://www.charity-gifts.org/products/tagged/Animal',
'/animal-lover-charity-gifts.php' => 'http://www.charity-gifts.org/products/tagged/Animal',
'/au/plan-sponsor-a-child.php' => 'http://www.donation4charity.org/products/tagged/Poverty',
'/british-red-cross-pass-the-parcel.php' => 'http://www.charity-gifts.org/charities/british-red-cross-pass-the-parcel',
'/cafod-world-gifts-charity-gifts.php' => 'http://www.charity-gifts.org/charities/cafod-world-gifts',
'/cancer-research-uk-gift-shop.php' => 'http://www.charity-gifts.org/charities/cancer-research-gift-shop',
'/cats-protection-sponsor-a-cat-cabin.php' => 'http://www.charity-gifts.org/products/tagged/Animal',
'/charity-christmas-cards.php' => 'http://www.charity-gifts.org/products/tagged/Christmas%20Cards',
'/charity-credit-cards/index.php' => 'http://www.donation4charity.org/',
'/charity-directory.php' => 'http://www.donation4charity.org/pages/charity-directory',
'/charity-rss-news-feed.php' => 'http://www.donation4charity.org/',
'/children/actionaid.php' => 'http://www.donation4charity.org/charities/actionaid-sponsor-a-child',
'/children/childline.php' => 'http://www.donation4charity.org/charities/nspcc',
'/children/children-in-crisis.php' => 'http://www.donation4charity.org/products/tagged/Children',
'/children/everychild-childrens-charity.php' => 'http://www.donation4charity.org/charities/everychild-donations',
'/children/great-ormond-street-charity.php' => 'http://www.donation4charity.org/products/tagged/Children',
'/children/index.php' => 'http://www.donation4charity.org/products/tagged/Children',
'/children/national-deaf-childrens-society.php' => 'http://www.donation4charity.org/products/tagged/Children',
'/children/nspcc-childrens-charity.php' => 'http://www.donation4charity.org/charities/nspcc',
'/children/plan-international.php' => 'http://www.donation4charity.org/charities/plan',
'/children/shelter.php' => 'http://www.donation4charity.org/charities/shelter',
'/children/the-childrens-society-charity.php' => 'http://www.donation4charity.org/products/tagged/Children',
'/children/unicef-childrens-charity.php' => 'http://www.donation4charity.orgcharities/unicef-donations',
'/children/world-vision.php' => 'http://www.donation4charity.org/products/tagged/Children',
'/childrens-charities-charity-gifts.php' => 'http://www.charity-gifts.org/products/tagged/Children',
'/concern-charity-gifts.php' => 'http://www.charity-gifts.org/charities/concern-worldwide-shop',
'/contact-us.php' => 'http://www.donation4charity.org/contacts/new',
'/disclaimer.php' => 'http://www.donation4charity.org/pages/disclaimer',
'/farm-africa-ecards.php' => 'http://www.charity-gifts.org/charities/farm-africa-e-cards',
'/farm-africa-farm-friends.php' => 'http://www.charity-gifts.org/charities/farm-africa-farm-friends',
'/farm-africa-presents.php' => 'http://www.charity-gifts.org/charities/farm-africa-presents',
'/gift-aid.php' => 'http://www.donation4charity.org/pages/gift-aid',
'/health/breakthrough-breast-cancer-uk.php' => 'http://www.donation4charity.org/products/tagged/Health',
'/health/british-heart-foundation.php' => 'http://www.donation4charity.org/products/tagged/Health',
'/health/cancer-research-uk.php' => 'http://www.donation4charity.org/charities/cancer-research-uk',
'/health/clic-sargent.php' => 'http://www.donation4charity.org/charities/clic-sargent',
'/health/great-ormond-street-charity.php' => 'http://www.donation4charity.org/products/tagged/Children',
'/health/index.php' => 'http://www.donation4charity.org/products/tagged/Health',
'/health/the-mental-health-foundation.php' => 'http://www.donation4charity.org/charities/the-mental-health-foundation',
'/help-the-aged-cows-n-things.php' => 'http://www.charity-gifts.org/charities/cows-n-things-from-help-the-aged',
'/human-rights/amnesty-international-uk.php' => 'http://www.donation4charity.org/charities/amnesty-international-uk',
'/human-rights/index.php' => 'http://www.donation4charity.org/products/tagged/Human%20Rights',
'/human-rights/royal-british-legion-poppy-appeal.php' => 'http://www.donation4charity.org/charities/the-royal-british-legion',
'/human-rights/the-medical-foundation-torture-care.php' => 'http://www.donation4charity.org/charities/the-medical-foundation-torture-care',
'/last-minute-charity-gifts.php' => 'http://www.charity-gifts.org/products/tagged/Last%20Minute%20Gifts',
'/mailing-list.php' => 'http://www.donation4charity.org/',
'/nspcc-letter-from-santa.php' => 'http://www.charity-gifts.org/charities/nspcc-letter-from-santa',
'/oxfam-unwrapped.php' => 'http://www.charity-gifts.org/charities/oxfam-unwrapped',
'/pdsa-animal-sponsorship.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/pdsa-pet-sponsorship',
'/pdsa-charity-gift-shop.php' => 'http://www.charity-gifts.org/charities/pdsa-shop',
'/pdsa-charity-gifts.php' => 'http://www.charity-gifts.org/charities/pdsa-pet-sponsorship',
'/pdsa-well-vetted-gift-shop.php' => 'http://www.charity-gifts.org/charities/pdsa-well-vetted-gifts',
'/pdsa-young-pet-protectors-club.php' => 'http://www.charity-gifts.org/charities/pdsa-young-pet-protectors',
'/planet/greenpeace-environmental-charity.php' => 'http://www.donation4charity.org/charities/greenpeace',
'/planet/index.php' => 'http://www.donation4charity.org/products/tagged/Planet',
'/planet/the-national-trust.php' => 'http://www.donation4charity.org/charities/the-national-trust',
'/planet/world-land-trust.php' => 'http://www.donation4charity.org/charities/world-land-trust',
'/planet/wwf-memberships.php' => 'http://www.donation4charity.org/charities/wwf-membership',
'/poverty/action-against-hunger.php' => 'http://www.donation4charity.org/products/tagged/Poverty',
'/poverty/actionaid.php' => 'http://www.donation4charity.org/charities/actionaid-sponsor-a-child',
'/poverty/british-red-cross.php' => 'http://www.donation4charity.org/charities/british-red-cross',
'/poverty/care-international.php' => 'http://www.donation4charity.org/products/tagged/Poverty',
'/poverty/index.php' => 'http://www.donation4charity.org/products/tagged/Poverty',
'/poverty/oxfam-online-shop.php' => 'http://www.donation4charity.org/charities/oxfam-unwrapped',
'/poverty/plan-international.php' => 'http://www.donation4charity.org/charities/plan',
'/poverty/practical-action.php' => 'http://www.donation4charity.org/charities/practical-action',
'/poverty/send-a-cow-donations.php' => 'http://www.donation4charity.org/charities/send-a-cow-donations',
'/poverty/shelter.php' => 'http://www.donation4charity.org/charities/shelter',
'/poverty/wateraid.php' => 'http://www.donation4charity.org/products/tagged/Poverty',
'/practical-presents.php' => 'http://www.charity-gifts.org/charities/practical-presents',
'/present-aid.php' => 'http://www.charity-gifts.org/charities/present-aid',
'/privacy-policy.php' => 'http://www.donation4charity.org/pages/privacy-policy',
'/rogavi-charity-raffle.php' => 'http://www.donation4charity.org/charities/rogavi-online-raffles-for-charity',
'/rspb-gifts.php' => 'http://www.charity-gifts.org/charities/rspb-gift-shop',
'/rspb-membership.php' => 'http://www.charity-gifts.org/charities/rspb-membership',
'/save-the-children-wish-list.php' => 'http://www.charity-gifts.org/charities/save-the-children-wish-list',
'/send-a-cow-gifts.php' => 'http://www.charity-gifts.org/charities/send-a-cow-gifts',
'/site-map.php' => 'http://www.donation4charity.org/sitemap',
'/terms-and-conditions.php' => 'http://www.donation4charity.org/pages/terms-and-conditions',
'/the-art-fund-membership.php' => 'http://www.charity-gifts.org/charities/the-art-fund',
'/the-aspinall-foundation-adopt-an-animal.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/the-aspinall-foundation',
'/top-charity-gifts.php' => '/',
'/uk-charity-events.php' => 'http://www.donation4charity.org/products/tagged/Charity%20Events',
'/unicef-shop.php' => 'http://www.charity-gifts.org/charities/unicef-inspired-gifts',
'/wildlife/adopt-an-animal-aspinall-foundation.php' => 'http://www.donation4charity.org/charities/the-aspinall-foundation',
'/wildlife/charity-pet-insurance.php' => 'http://www.donation4charity.org/',
'/wildlife/compassion-in-world-farming.php' => 'http://www.donation4charity.org/charities/ciwf',
'/wildlife/index.php' => 'http://www.donation4charity.org/products/tagged/Animal',
'/wildlife/pdsa-pet-care.php' => 'http://www.donation4charity.org/charities/pdsa-pet-sponsorship',
'/wildlife/rspb-membership.php' => 'http://www.donation4charity.org/charities/rspb-membership',
'/wildlife/wspa-animal-charity.php' => 'http://www.donation4charity.org/charities/wspa',
'/wildlife/wwf-adopt-an-animal.php' => 'http://www.donation4charity.org/charities/wwf-adopt-an-animal',
'/world-vision-child-sponsorship.php' => 'http://www.charity-gifts.org/charities/world-vision-must-have-gifts',
'/world-vision-must-have-gifts.php' => 'http://www.charity-gifts.org/charities/world-vision-must-have-gifts',
'/wwf-adopt-a-dolphin.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-a-dolphin',
'/wwf-adopt-a-leopard.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-a-leopard',
'/wwf-adopt-a-panda.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-a-panda',
'/wwf-adopt-a-penguin.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-a-penguin',
'/wwf-adopt-a-polar-bear.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-a-polar-bear',
'/wwf-adopt-a-rhino.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-a-rhino',
'/wwf-adopt-a-tiger.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-a-tiger',
'/wwf-adopt-a-turtle.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-a-turtle',
'/wwf-adopt-an-animal.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal',
'/wwf-adopt-an-elephant.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-an-elephant',
'/wwf-adopt-an-orang-utan.php' => 'http://www.wwf-animal-adoptions.org.uk/charities/wwf-adopt-an-animal/products/adopt-an-orang-utan',
'/wwf-green-gifts-charity-gift-shop.php' => 'http://www.charity-gifts.org/charities/wwf-shop',
'/wwf-membership.php' => 'http://www.charity-gifts.org/charities/wwf-membership'
}
# if the current domain matches one of our domain redirects, then redirect
# but keep the path and query
if domain_redirects[req.host]
req.permanent! "http://#{domain_redirects[req.host]}#{request_string}"
end
# Does the current host match one of our path_rewrite keys?
if path_rewrites.has_key? req.host
# Does the current request match one of the keys within that?
if path_rewrites[req.host].has_key? request_string
# Redirect to the value for that key
req.permanent! path_rewrites[req.host][request_string]
end
end
# Check for global rewrites
if global_path_writes.has_key? request_string
req.permanent! global_path_writes[request_string]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment