# Redirect all extensions to html if ($is_args = ''){ rewrite ^([^.]*)\.shtml$ $1.html permanent; rewrite ^([^.]*)\.phtml$ $1.html permanent; rewrite ^([^.]*)\.jhtml$ $1.html permanent; rewrite ^([^.]*)\.htm$ $1.html permanent; rewrite ^([^.]*)\.php$ $1.html permanent; rewrite ^([^.]*)\.aspx$ $1.html permanent; rewrite ^([^.]*)\.asp$ $1.html permanent; rewrite ^([^.]*)\.jsp$ $1.html permanent; rewrite ^([^.]*)\.apk$ $1.html permanent; } # End: Redirect all extensions to html # Create pretty URLs rewrite ^/([^/]+)$ /$1.html last; rewrite ^/([^/]+)/([^/]+)$ /$1/$2.html last; rewrite ^/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3.html last; rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4.html last; rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5.html last; rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6.html last; rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7.html last; rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8.html last; rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8/$9.html last; rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8/$9/$10.html last; # End: Create pretty URLs # Specific redirections rewrite ^/page/Distinguished-Fellows-&-Advisors$ /page/Distinguished-Fellows---Advisors? permanent; if ($args ~* ^page=1$){ rewrite ^/page/completed-projects$ /page/completed-projects/page-1? permanent; } if ($args ~* ^page=2$){ rewrite ^/page/completed-projects$ /page/completed-projects/page-2? permanent; } if ($args ~* ^page=3$){ rewrite ^/page/completed-projects$ /page/completed-projects/page-3? permanent; } if ($args ~* ^came_from=$){ rewrite ^/join_form$ /join_form_came_from? permanent; } if ($args ~* ^userid=$){ rewrite ^/mail_password_form$ /mail_password_form_userid? permanent; } if ($args ~* ^author=megha$){ rewrite ^/author_details$ /author_details_author-megha? permanent; } if ($args ~* ^author=Gopathampi$){ rewrite ^/author_details$ /author_details_author-Gopathampi? permanent; } if ($args ~* ^author=bass$){ rewrite ^/author_details$ /author_details_author-bass? permanent; } rewrite ^/publications/PAC\sANNUAL\sREPORT\s2008-09\.PDF/view\|nothing$ /publications/PACANNUALREPORT2008-09_PDF/view-nothing? permanent; rewrite ^/publications/PAC\sANNUAL\sREPORT\s2008-09\.PDF/view$ /publications/PACANNUALREPORT2008-09_PDF/view? permanent; rewrite ^/Members/megha/Political\sParties\sas\sCornerstones\sof\sDemocratic\sGovenance\.pdf/view\|nothing$ /Members/megha/PoliticalPartiesasCornerstonesofDemocraticGovenance_pdf/view-nothing? permanent; rewrite ^/Members/megha/Political\sParties\sas\sCornerstones\sof\sDemocratic\sGovenance\.pdf/view$ /Members/megha/PoliticalPartiesasCornerstonesofDemocraticGovenance_pdf/view? permanent; rewrite ^/Members/megha/North\ssouth\spaper-final-Feb2010\.pdf/view\|nothing$ /Members/megha/Northsouthpaper-final-Feb2010_pdf/view-nothing? permanent; rewrite ^/Members/megha/North\ssouth\spaper-final-Feb2010\.pdf/view$ /Members/megha/Northsouthpaper-final-Feb2010_pdf/view? permanent; rewrite ^/Members/megha/Public\sEye\.pdf/view\|nothing$ /Members/megha/PublicEye_pdf/view-nothing? permanent; rewrite ^/Members/megha/Public\sEye\.pdf/view$ /Members/megha/PublicEye_pdf/view? permanent; rewrite ^/publications/Bangalore_Maternity_Homes_CRC\.pdf/view\|nothing$ /publications/Bangalore_Maternity_Homes_CRC_pdf/view-nothing? permanent; rewrite ^/publications/Bangalore_Maternity_Homes_CRC\.pdf/view$ /publications/Bangalore_Maternity_Homes_CRC_pdf/view? permanent; rewrite ^/publications/CC_ADecadeOfExperience\.pdf/view\|nothing$ /publications/CC_ADecadeOfExperience_pdf/view-nothing? permanent; rewrite ^/publications/CC_ADecadeOfExperience\.pdf/view$ /publications/CC_ADecadeOfExperience_pdf/view? permanent; if ($args ~* ^b_start\:int=10&-C=$){ rewrite ^/publications/index_html$ /publications/index_html_b_start-int-10--C? permanent; } if ($args ~* ^b_start\:int=20&-C=$){ rewrite ^/publications/index_html$ /publications/index_html_b_start-int-20--C? permanent; } if ($args ~* ^author=manager$){ rewrite ^/author_details$ /author_details_author-manager? permanent; } rewrite ^/Members/megha/Innovations\sin\sChinese\sLocal\sGovernance\.ppt/view$ /Members/megha/InnovationsinChineseLocalGovernance.ppt/view? permanent; rewrite ^/publications/PAC_Capability_Statement\.pdf/view$ /publications/PAC_Capability_Statement_pdf/view? permanent; rewrite ^/Members/megha/Press\sRelease\.pdf/view$ /Members/megha/PressRelease_pdf/view? permanent; rewrite ^/Members/megha/Public\sServices\sin\sHubli-Dharwad\s-\sThe\sSecond\sCitizen\sReport\sCard\.zip/view$ /Members/megha/PublicServicesinHubli-Dharwad-TheSecondCitizenReportCard.zip/view? permanent; rewrite ^/Members/megha/Decentralised\sService\sDelivery\sin\sPanchayats\.zip/view$ /Members/megha/DecentralisedServiceDeliveryinPanchayats.zip/view? permanent; rewrite ^/projects/right-to-information-empowerment-programme-strategic-litigation-support/S\s\sBenzing-Balzer\s-\sStrategic\slitigation\s-\san\sintroduction\.ppt/view$ /projects/right-to-information-empowerment-programme-strategic-litigation-support/SBenzing-Balzer-Strategiclitigation-anintroduction.ppt/view? permanent; if ($args ~* ^author=sabine$){ rewrite ^/author_details$ /author_details_author-sabine? permanent; } rewrite ^/projects/right-to-information-empowerment-programme-right-to-information-training-for-ngos-from-india/PAC\s-\sRight\sto\sInformation\sResource\sKit\s-\sIndia\.pdf/view$ /projects/right-to-information-empowerment-programme-right-to-information-training-for-ngos-from-india/PAC-RighttoInformationResourceKit-India_pdf/view? permanent; if ($args ~* ^start2=2009/11/01&end2=2009/12/01$){ rewrite ^/publications/index_html$ /publications/index_html_start2-2009_11_01-end2-2009_12_01? permanent; } if ($args ~* ^start2=2009/10/01&end2=2009/11/01$){ rewrite ^/publications/index_html$ /publications/index_html_start2-2009_10_01-end2-2009_11_01? permanent; } if ($args ~* ^start2=2009/9/01&end2=2009/10/01$){ rewrite ^/publications/index_html$ /publications/index_html_start2-2009_9_01-end2-2009_10_01? permanent; } rewrite ^/projects/right-to-information-empowerment-programme-overview/HIVOS\sProject\sProposal\s-\sRight\sto\sInformation\sEmpowerment\sProgramme\s-\s2006\.pdf/view$ /projects/right-to-information-empowerment-programme-overview/HIVOSProjectProposal-RighttoInformationEmpowermentProgramme-2006_pdf/view? permanent; rewrite ^/publications/VGNew3\.pdf/view$ /publications/VGNew3_pdf/view? permanent;